public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Laszlo Ersek" <lersek@redhat.com>
To: devel@edk2.groups.io, michael.kubacki@outlook.com,
	Bret Barkelew <brbarkel@microsoft.com>
Cc: Jian J Wang <jian.j.wang@intel.com>,
	Hao A Wu <hao.a.wu@intel.com>, Liming Gao <liming.gao@intel.com>,
	"Ard Biesheuvel (ARM address)" <ard.biesheuvel@arm.com>
Subject: Re: [edk2-devel] [PATCH v3 09/14] MdeModulePkg: Connect VariablePolicy business logic to VariableServices
Date: Fri, 22 May 2020 22:29:22 +0200	[thread overview]
Message-ID: <60564f19-e606-bc30-c09a-b2da57b9e10d@redhat.com> (raw)
In-Reply-To: <MWHPR07MB3440A5FB692BCC8D56628859E9B70@MWHPR07MB3440.namprd07.prod.outlook.com>

Hello,

(+Ard)

this patch does not apply (with "master" being at 74f90d38c446).
Because:

On 05/22/20 00:43, Michael Kubacki wrote:

> diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf
> index 592862773390..1b18ce655522 100644
> --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf
> +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf
> @@ -14,6 +14,7 @@
>  #  the authentication service provided in this driver will be broken, and the behavior is undefined.
>  #
>  # Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.<BR>
> +# Copyright (c) Microsoft Corporation.<BR>
>  # SPDX-License-Identifier: BSD-2-Clause-Patent
>  #
>  ##
> @@ -42,6 +43,7 @@ [Sources]
>    VariableParsing.c
>    VariableParsing.h
>    Variable.h
> +  VariablePolicySmmDxe.c
>
>  [Packages]
>    MdePkg/MdePkg.dec
> @@ -56,22 +58,29 @@ [LibraryClasses]
>    DxeServicesTableLib
>    UefiDriverEntryPoint
>    TpmMeasurementLib
> +  SafeIntLib
> +  PcdLib
>
>  [Protocols]
>    gEfiVariableWriteArchProtocolGuid             ## PRODUCES
>    gEfiVariableArchProtocolGuid                  ## PRODUCES
>    gEfiSmmCommunicationProtocolGuid              ## CONSUMES
> +  gEfiMmCommunicationProtocolGuid               ## CONSUMES

The context no longer matches here. This context has most recently been
modified by commit be4e0cfbad6b ("MdeModulePkg/VariableSmmRuntimeDxe:
switch to MM communicate 2", 2020-05-12):

$ git show be4e0cfbad6b -- \
    MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf

Output:

> diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf
> index 592862773390..01564e4c5068 100644
> --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf
> +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf
> @@ -60,7 +60,7 @@ [LibraryClasses]
>  [Protocols]
>    gEfiVariableWriteArchProtocolGuid             ## PRODUCES
>    gEfiVariableArchProtocolGuid                  ## PRODUCES
> -  gEfiSmmCommunicationProtocolGuid              ## CONSUMES
> +  gEfiMmCommunication2ProtocolGuid              ## CONSUMES
>    ## CONSUMES
>    ## NOTIFY
>    ## UNDEFINED # Used to do smm communication
> @@ -100,7 +100,7 @@ [Guids]
>    gEfiImageSecurityDatabaseGuid
>
>  [Depex]
> -  gEfiSmmCommunicationProtocolGuid
> +  gEfiMmCommunication2ProtocolGuid
>
>  [UserExtensions.TianoCore."ExtraFiles"]
>    VariableSmmRuntimeDxeExtra.uni

And, because of the Depex change in that commit
(gEfiSmmCommunicationProtocolGuid -> gEfiMmCommunication2ProtocolGuid),
the last (4th) hunk of the present patch also fails to apply:

>    ## CONSUMES
>    ## NOTIFY
>    ## UNDEFINED # Used to do smm communication
>    gEfiSmmVariableProtocolGuid
>    gEdkiiVariableLockProtocolGuid                ## PRODUCES
>    gEdkiiVarCheckProtocolGuid                    ## PRODUCES
> +  gEdkiiVariablePolicyProtocolGuid              ## PRODUCES
>
>  [FeaturePcd]
>    gEfiMdeModulePkgTokenSpaceGuid.PcdEnableVariableRuntimeCache           ## CONSUMES
>    gEfiMdeModulePkgTokenSpaceGuid.PcdVariableCollectStatistics            ## CONSUMES
>
> +[Pcd]
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdAllowVariablePolicyEnforcementDisable     ## CONSUMES
> +
>  [Guids]
>    ## PRODUCES             ## GUID # Signature of Variable store header
>    ## CONSUMES             ## GUID # Signature of Variable store header
> @@ -99,6 +108,8 @@ [Guids]
>    ## SOMETIMES_CONSUMES   ## Variable:L"dbt"
>    gEfiImageSecurityDatabaseGuid
>
> +  gVarCheckPolicyLibMmiHandlerGuid
> +
>  [Depex]
>    gEfiSmmCommunicationProtocolGuid
>
>

See the obsolete depex context above.

Ard had sent a heads-up about this under v2:

  http://mid.mail-archive.com/b968f054-8917-6c16-e5ff-9976d192d398@arm.com
  https://edk2.groups.io/g/devel/message/59259

Please rebase this series to "master" and repost it.

(Of course I suggest waiting some more for v3 feedback; for example I
plan to review the v3 ArmVirtPkg and OvmfPkg patches.)

Thanks!
Laszlo


  reply	other threads:[~2020-05-22 20:29 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200521224331.15616-1-michael.kubacki@outlook.com>
2020-05-21 22:43 ` [PATCH v3 01/14] MdeModulePkg: Define the VariablePolicy protocol interface Michael Kubacki
2020-05-21 22:43 ` [PATCH v3 02/14] MdeModulePkg: Define the VariablePolicyLib Michael Kubacki
2020-05-21 22:43 ` [PATCH v3 03/14] MdeModulePkg: Define the VariablePolicyHelperLib Michael Kubacki
2020-05-21 22:43 ` [PATCH v3 04/14] MdeModulePkg: Define the VarCheckPolicyLib and SMM interface Michael Kubacki
2020-05-21 22:43 ` [PATCH v3 05/14] OvmfPkg: Add VariablePolicy engine to OvmfPkg platform Michael Kubacki
2020-05-22 21:41   ` [edk2-devel] " Laszlo Ersek
2020-05-22 22:35     ` [EXTERNAL] " Bret Barkelew
2020-05-25 18:02       ` Laszlo Ersek
2020-05-21 22:43 ` [PATCH v3 06/14] EmulatorPkg: Add VariablePolicy engine to EmulatorPkg platform Michael Kubacki
2020-05-21 22:43 ` [PATCH v3 07/14] ArmVirtPkg: Add VariablePolicy engine to ArmVirtPkg platform Michael Kubacki
2020-05-22 21:47   ` [edk2-devel] " Laszlo Ersek
2020-05-21 22:43 ` [PATCH v3 08/14] UefiPayloadPkg: Add VariablePolicy engine to UefiPayloadPkg platform Michael Kubacki
2020-05-22  0:29   ` [edk2-devel] " Ma, Maurice
2020-05-21 22:43 ` [PATCH v3 09/14] MdeModulePkg: Connect VariablePolicy business logic to VariableServices Michael Kubacki
2020-05-22 20:29   ` Laszlo Ersek [this message]
2020-05-21 22:43 ` [PATCH v3 10/14] MdeModulePkg: Allow VariablePolicy state to delete protected variables Michael Kubacki
2020-05-21 22:43 ` [PATCH v3 11/14] SecurityPkg: Allow VariablePolicy state to delete authenticated variables Michael Kubacki
2020-05-21 22:43 ` [PATCH v3 12/14] MdeModulePkg: Change TCG MOR variables to use VariablePolicy Michael Kubacki
2020-05-21 22:43 ` [PATCH v3 13/14] MdeModulePkg: Drop VarLock from RuntimeDxe variable driver Michael Kubacki
2020-05-21 22:43 ` [PATCH v3 14/14] MdeModulePkg: Add a shell-based functional test for VariablePolicy Michael Kubacki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=60564f19-e606-bc30-c09a-b2da57b9e10d@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox