From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 011E5940A11 for ; Wed, 20 Dec 2023 01:55:14 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=cw1wzZ7NC9d8N5Tn/UOmNyH5JP4agsChF1JM7rJAw6o=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-ID: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=1703037313; v=1; b=Z4xKnTDEcxSkqVECUC5SZPZLKEO/4xkUzpTEKD1CdRetRtZmjvdAD7NEzuN4RPIKixjzSJ7b DxqQae8lS7jJwEeMckkmQhNW6L9NSAhvuNTivbIHDQitkHSyqFD2K1UtM7Q+PF3hcsAPRi00oAl qraDTd1TTPEFc6naqeIUPgTw= X-Received: by 127.0.0.2 with SMTP id Z8h0YY7687511x6NRbtJlUw2; Tue, 19 Dec 2023 17:55:13 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by mx.groups.io with SMTP id smtpd.web10.12738.1703037312815796096 for ; Tue, 19 Dec 2023 17:55:13 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10929"; a="386173332" X-IronPort-AV: E=Sophos;i="6.04,290,1695711600"; d="scan'208";a="386173332" X-Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Dec 2023 17:55:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10929"; a="776165827" X-IronPort-AV: E=Sophos;i="6.04,290,1695711600"; d="scan'208";a="776165827" X-Received: from liyi4-desktop.ccr.corp.intel.com ([10.239.153.29]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Dec 2023 17:55:08 -0800 From: "Li, Yi" To: devel@edk2.groups.io Cc: Yi Li , Michael D Kinney , Liming Gao , Zhiguang Liu , Wei6 Xu Subject: [edk2-devel] [PATCH V2 0/2] Add DECLARE_LENGTH opcode of dependency expression Date: Wed, 20 Dec 2023 09:54:53 +0800 Message-ID: <20231220015455.1636-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: ujOl1xihf4SBZcuneF7GNHZ7x7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=Z4xKnTDE; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io 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. Syntax DECLARE_LENGTH <32-bit Length> Description Declares an 32-bit byte length of the entire dependency expression. Behaviors and Restrictions This opcode must be the first one in a dependency expression. REF: UEFI spec 2.10 Table 23.4 Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Cc: Wei6 Xu Yi Li (2): MdePkg: Add DECLARE_LENGTH opcode of dependency expression FmpDevicePkg: Add DECLARE_LENGTH opcode of dependency expression .../FmpDependencyLib/FmpDependencyLib.c | 35 ++++++++ .../PrivateInclude/FmpLastAttemptStatus.h | 3 + .../EvaluateDependencyUnitTest.c | 84 ++++++++++++++++--- MdePkg/Include/Protocol/FirmwareManagement.h | 29 +++---- 4 files changed, 125 insertions(+), 26 deletions(-) -- 2.42.0.windows.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112737): https://edk2.groups.io/g/devel/message/112737 Mute This Topic: https://groups.io/mt/103274336/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-