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 C9F9DD80078 for ; Tue, 19 Dec 2023 04:50:27 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=Yj6vXSVLIrHzk+7wtSAaVyl64SZErK5/PE6ydiAV0Ik=; 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=1702961426; v=1; b=bDZUZNRmnkjJqYVfcmp22R8lfrqJA5OHx9Q+EiWZ7OjW+NqHA8I1BDj7uh3iFmd19QdBxMOk 9vqYkHkL7aFMFZDFM5hMSNKUNWL5jRkcQHXRMxP1euEMcKU0t7slxynh4Y5/L0xsXQCFnRfpD6T DLzgoSoYWnp850qqPuDvb6zI= X-Received: by 127.0.0.2 with SMTP id xzADYY7687511xGQk5JhcMBn; Mon, 18 Dec 2023 20:50:26 -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:26 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10928"; a="481798133" X-IronPort-AV: E=Sophos;i="6.04,287,1695711600"; d="scan'208";a="481798133" 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:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10928"; a="841752576" X-IronPort-AV: E=Sophos;i="6.04,287,1695711600"; d="scan'208";a="841752576" 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:24 -0800 From: "Li, Yi" To: devel@edk2.groups.io Cc: Yi Li Subject: [edk2-devel] [PATCH 0/2] Add DECLARE_LENGTH opcode of dependency expression Date: Tue, 19 Dec 2023 12:50:11 +0800 Message-ID: <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: eYpOxpISpdMrYCoQtna24l02x7686176AA= 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=bDZUZNRm; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none) Mantis: https://mantis.uefi.org/mantis/view.php?id=2025 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 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. 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 (#112686): https://edk2.groups.io/g/devel/message/112686 Mute This Topic: https://groups.io/mt/103257906/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-