From patchwork Wed Sep 23 10:40:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= X-Patchwork-Id: 272949 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2F381C2D0A8 for ; Wed, 23 Sep 2020 10:43:15 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9B05C21D7D for ; Wed, 23 Sep 2020 10:43:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="FS0jKURo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9B05C21D7D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:44832 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kL2Ez-0000cj-OZ for qemu-devel@archiver.kernel.org; Wed, 23 Sep 2020 06:43:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50726) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kL2DC-000837-LN for qemu-devel@nongnu.org; Wed, 23 Sep 2020 06:41:22 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:25474) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kL2DA-0006wr-Ob for qemu-devel@nongnu.org; Wed, 23 Sep 2020 06:41:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600857679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9Qijfm6XLcC2OCXAPlPFsmW1AdwbUaETxOTIW7t1nOA=; b=FS0jKURo7SP73qoA2QvWHDL91BmBv2Pdzbkm++MI/Iag6UuJ8njg+hJ+rYfVXG7gx7wBEL R4+gVKd2CVunXG/hKik1p4avp2rpRBgm+KMx19GMw5wdx6OjOM7Diq/Yv3RNGP75vg6iKl 48O6eYsYNV2BJZaX0QVqWSKaLUPbqpk= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-309-Ajj-12TjO-Ckm2jh-Nbo2g-1; Wed, 23 Sep 2020 06:41:16 -0400 X-MC-Unique: Ajj-12TjO-Ckm2jh-Nbo2g-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DFAA764091; Wed, 23 Sep 2020 10:41:14 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-114-73.ams2.redhat.com [10.36.114.73]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0F9DE1002382; Wed, 23 Sep 2020 10:41:03 +0000 (UTC) From: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 0/3] Add support for loading SMBIOS OEM strings from a file Date: Wed, 23 Sep 2020 11:40:59 +0100 Message-Id: <20200923104102.2068416-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=berrange@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/22 23:02:20 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.455, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , =?utf-8?q?Daniel_P=2E_Berran?= =?utf-8?b?Z8Op?= , Eduardo Habkost , "Michael S. Tsirkin" , Markus Armbruster , qemu-arm@nongnu.org, Paolo Bonzini , Igor Mammedov , Laszlo Ersek , Richard Henderson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" I previously added support for SMBIOS OEM strings tables but only allowed for data to be passed inline. Potential users indicated they wanted to pass some quite large data blobs which is inconvenient todo inline. Thus I'm adding support for passing the data from a file. In testing this I discovered the hard way that on x86 we're limited to using the SMBIOS 2.1 entry point currently. This has a maximum size of 0xffff, and if you exceed this all sorts of wierd behaviour happens. QEMU forces SMBIOS 2.1 on x86 because the default SeaBIOS firmware does not support SMBIOS 3.0. The EDK2 firmware supports SMBIOS 3.0 and QEMU defaults to this on the ARM virt machine type. This series adds support for checking the SMBIOS 2.1 limits to protect users from impossible to diagnose problems. There is also a fix needed to SeaBIOS which fails to check for integer overflow when it appends the type 0 table. https://mail.coreboot.org/hyperkitty/list/seabios@seabios.org/thread/3EMIOY= 6YS6MG5UQN3JJJS2A3DJZOVFR6/ IIUC, SMBIOS 3.0 should only be limited by what you can fit into RAM, but in testing, EDK2 appears to hang shortly after the SMBIOS 3.0 data size exceeds 128 KB. I've not spotted an obvious flaw in EDK2 or QEMU, nor do I attempt to enforce a limit in QEMU for SMBIOS 3.0. Changed in v2: - Drop the patches that allowed choice of SMBIOS 2.1 / 3.0 entry point. There's no compelling reason to need 3.0 on x86 while aarch64 is 3.0 only. Daniel P. Berrang=C3=A9 (3): hw/smbios: support loading OEM strings values from a file hw/smbios: report error if table size is too large qemu-options: document SMBIOS type 11 settings hw/smbios/smbios.c | 86 +++++++++++++++++++++++++++++++++++++++------- qemu-options.hx | 41 ++++++++++++++++++++++ 2 files changed, 114 insertions(+), 13 deletions(-) --=20 2.26.2