From nobody Mon Feb 9 03:13:33 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+112687+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112687+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1702961428; cv=none; d=zohomail.com; s=zohoarc; b=fj3Vxf4+XegZ7hVn7z7dch0h1MFhdJggCKPvE6D45zBVRy2lqbHkXrjTBl9IHga9Ifxo8b2cAd/tseeVfRLkGsrbvskPMaMsFN0fjGfvPgOxNxZez/0/Otzgqr5lMCvWFnbYkCIlqAUaOzadxqmm6+c0Kln2Mr2dLxO6tbmWvOc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1702961428; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=f0t0+mnvlXCho6zn9eI4IzmoCDKu5f1McC9euzcSi7o=; b=oIwZ1VfD204PTtT88AVUmSmaXbL22+MaqVdhS5++m4ti7bIwCHRDk8A4wqnY9mw7anpSdET+j6a/qmMkxddRCqAlJw2y5Tcc9DB42LXNNwUV0FylmToCfldIkxVP0VLhilWG116e3vuEpPL4EQqpa3ce0jViuMf/E4omMrKG6Kk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112687+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1702961428050373.9652859942123; Mon, 18 Dec 2023 20:50:28 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=eKVol84bWYiCURoh7nHb5f5JR9t6gS0UU8ytNx6zBhA=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1702961427; v=1; b=bKBpNTo21FmqWBvGeobzNomAsqxelh9Rajjk+oWiTf4mdy9v2uIK/le8HgQd4zHLs0jF48w7 KEdAqfIHu3hIH5YpOvedpVk8O3AYFEvMkRGr+GpB7vVDBnBs9dSl82cG8grAjy47IoqsEaGYVLY C1JX8urlL6n98/oO42yFpk6A= X-Received: by 127.0.0.2 with SMTP id duPoYY1788612xFLwCHYFcwc; Mon, 18 Dec 2023 20:50:27 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web11.5762.1702961425788074891 for ; Mon, 18 Dec 2023 20:50:27 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10928"; a="481798134" X-IronPort-AV: E=Sophos;i="6.04,287,1695711600"; d="scan'208";a="481798134" X-Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Dec 2023 20:50:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10928"; a="841752582" X-IronPort-AV: E=Sophos;i="6.04,287,1695711600"; d="scan'208";a="841752582" X-Received: from liyi4-desktop.ccr.corp.intel.com ([10.239.153.29]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Dec 2023 20:50:25 -0800 From: "Li, Yi" To: devel@edk2.groups.io Cc: Yi Li , Michael D Kinney , Liming Gao , Zhiguang Liu Subject: [edk2-devel] [PATCH 1/2] MdePkg: Add DECLARE_LENGTH opcode of dependency expression Date: Tue, 19 Dec 2023 12:50:12 +0800 Message-ID: <20231219045013.1425-2-yi1.li@intel.com> In-Reply-To: <20231219045013.1425-1-yi1.li@intel.com> References: <20231219045013.1425-1-yi1.li@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,yi1.li@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: iOHD4VvDi7VxZK1a8YY3i50Rx1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1702961428889100003 Content-Type: text/plain; charset="utf-8" Mantis: https://mantis.uefi.org/mantis/view.php?id=3D2025 To avoid messy parsing of the Depex section of a Capsule, it would be a lot easier for everyone involved if we preceded the Capsule Depex Section with a length declaration. It provides simple bounds checking to avoid having to parse the op-codes, but in the case of a malformed depex being parsed, avoid other issues which can be messy. REF: UEFI spec 2.10 Table 23.4 Signed-off-by: Yi Li Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu --- MdePkg/Include/Protocol/FirmwareManagement.h | 29 ++++++++++---------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/MdePkg/Include/Protocol/FirmwareManagement.h b/MdePkg/Include/= Protocol/FirmwareManagement.h index f37067df3455..e535bb697d88 100644 --- a/MdePkg/Include/Protocol/FirmwareManagement.h +++ b/MdePkg/Include/Protocol/FirmwareManagement.h @@ -30,20 +30,21 @@ typedef struct _EFI_FIRMWARE_MANAGEMENT_PROTOCOL EFI_FI= RMWARE_MANAGEMENT_PROTOCO /// /// Dependency Expression Opcode /// -#define EFI_FMP_DEP_PUSH_GUID 0x00 -#define EFI_FMP_DEP_PUSH_VERSION 0x01 -#define EFI_FMP_DEP_VERSION_STR 0x02 -#define EFI_FMP_DEP_AND 0x03 -#define EFI_FMP_DEP_OR 0x04 -#define EFI_FMP_DEP_NOT 0x05 -#define EFI_FMP_DEP_TRUE 0x06 -#define EFI_FMP_DEP_FALSE 0x07 -#define EFI_FMP_DEP_EQ 0x08 -#define EFI_FMP_DEP_GT 0x09 -#define EFI_FMP_DEP_GTE 0x0A -#define EFI_FMP_DEP_LT 0x0B -#define EFI_FMP_DEP_LTE 0x0C -#define EFI_FMP_DEP_END 0x0D +#define EFI_FMP_DEP_PUSH_GUID 0x00 +#define EFI_FMP_DEP_PUSH_VERSION 0x01 +#define EFI_FMP_DEP_VERSION_STR 0x02 +#define EFI_FMP_DEP_AND 0x03 +#define EFI_FMP_DEP_OR 0x04 +#define EFI_FMP_DEP_NOT 0x05 +#define EFI_FMP_DEP_TRUE 0x06 +#define EFI_FMP_DEP_FALSE 0x07 +#define EFI_FMP_DEP_EQ 0x08 +#define EFI_FMP_DEP_GT 0x09 +#define EFI_FMP_DEP_GTE 0x0A +#define EFI_FMP_DEP_LT 0x0B +#define EFI_FMP_DEP_LTE 0x0C +#define EFI_FMP_DEP_END 0x0D +#define EFI_FMP_DEP_DECLARE_LENGTH 0x0E =20 /// /// Image Attribute - Dependency --=20 2.42.0.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112687): https://edk2.groups.io/g/devel/message/112687 Mute This Topic: https://groups.io/mt/103257908/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-