From nobody Wed Dec 29 22:31:40 2021 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5ED131919C59; Wed, 29 Dec 2021 22:31:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JPR310rpHz3QdC; Wed, 29 Dec 2021 22:31:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F31C7502F; Wed, 29 Dec 2021 22:31:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BTMVeLV049271; Wed, 29 Dec 2021 22:31:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BTMVeGk049270; Wed, 29 Dec 2021 22:31:40 GMT (envelope-from git) Date: Wed, 29 Dec 2021 22:31:40 GMT Message-Id: <202112292231.1BTMVeGk049270@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Toomas Soome Subject: git: 04f55b5b0e8f - main - bhyve smbios type 3 structure is incorrect List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tsoome X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 04f55b5b0e8f561aac100083f07df3f570880d69 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640817101; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+0fTG0Jq6k0G6+Rmn3ihV4giSAlJY3GSPAcDS53QvXY=; b=gY1Ey4HTPLGTWhVTV6KTkwGQ0oyxVA8ReXaKBAflExEVoaBd1+33OmKLoLrrCrcF51hHAw w1W3tM3pyIAxlfsztxNgOSSzOcPCOx/bkITAv5+O7sXKyqU37lnfpQyDDbnIc9FRiZx8MO YCo76SIyLrjn9LAFslyy7r6++eclSdANHsJv5P/EQuDxzcDTZrQ4CDyyLkHDWFinJ+NAuv r3b0vyTD45hiWSKGy/k4NXqcX5PnnR8LLJtYJRHfVlhPmPyUleh+XXdqsHYJSaPuxfchf1 BRyXJvQN2BFSUWhxhInwEHLFlqRmQ4PxGdyX0MkKFTW4dvDYfMZz2fiszQA01A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640817101; a=rsa-sha256; cv=none; b=Jta4f/BN2sgzZenVNf2GdCl5kS4lQu4aB3h+aApmNUKqU6Ogx1o/mJWK4mTn+S6CTVakOn srcoBmi93/aiHLB23tjwHuJR0+Ba9Arn9OhbWv1AZGBKIMBKeQsUsFe+k7Tze4ghhP3hZi jCQRlMWHNgaEK0d0//DfbP5UIpl8jKmLGSAl17ETcsH/eYzDuYcMALFGRJLKlUkM3j12nP vOT8fgOFUz3W2S3hRBeUlwVVEp6H0L+oFcgOMgSxoTlbRaOOS/D9hNomyTDcEVEgnnN+GS m3E+pO6VsC9KJ5PN9eIQ88nhfhswMk1AOZRQa49n+UPRLYfcj/7pWkUCJYj+Fg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=04f55b5b0e8f561aac100083f07df3f570880d69 commit 04f55b5b0e8f561aac100083f07df3f570880d69 Author: Toomas Soome AuthorDate: 2021-12-26 09:01:16 +0000 Commit: Toomas Soome CommitDate: 2021-12-27 18:06:33 +0000 bhyve smbios type 3 structure is incorrect If you look at the SMBIOS specification, we'll find something is missing. In particular at offset 0Dh is supposed to be the OEM-defined field. This should go between security and height. It is not legal to actually skip this and will lead to other folks not properly interpreting later parts of the table. https://www.illumos.org/issues/14312 Reviewed by: jhb Submitted by: Robert Mustacchi Obtained from: ilumos MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D33682 --- usr.sbin/bhyve/smbiostbl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.sbin/bhyve/smbiostbl.c b/usr.sbin/bhyve/smbiostbl.c index ada3177105a9..2dc50e6e6f01 100644 --- a/usr.sbin/bhyve/smbiostbl.c +++ b/usr.sbin/bhyve/smbiostbl.c @@ -199,6 +199,7 @@ struct smbios_table_type3 { uint8_t psstate; /* power supply state */ uint8_t tstate; /* thermal state */ uint8_t security; /* security status */ + uint32_t oemdata; /* OEM-specific data */ uint8_t uheight; /* height in 'u's */ uint8_t cords; /* number of power cords */ uint8_t elems; /* number of element records */ @@ -417,6 +418,7 @@ struct smbios_table_type3 smbios_type3_template = { SMBIOS_CHST_SAFE, SMBIOS_CHST_SAFE, SMBIOS_CHSC_NONE, + 0, /* OEM specific data, we have none */ 0, /* height in 'u's (0=enclosure height unspecified) */ 0, /* number of power cords (0=number unspecified) */ 0, /* number of contained element records */