public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Wu, Hao A" <hao.a.wu@intel.com>
To: "Kinney, Michael D" <michael.d.kinney@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: Liming Gao <gaoliming@byosoft.com.cn>,
	Bret Barkelew <Bret.Barkelew@microsoft.com>
Subject: Re: [Patch v4 0/2] MdeModulePkg/Variable/RuntimeDxe: Restore Variable Lock Protocol behavior
Date: Fri, 11 Dec 2020 08:12:13 +0000	[thread overview]
Message-ID: <BN8PR11MB36663371FC0763F744562854CACA0@BN8PR11MB3666.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20201211080118.1885-1-michael.d.kinney@intel.com>

For the series:
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>

Best Regards,
Hao Wu

> -----Original Message-----
> From: Michael D Kinney <michael.d.kinney@intel.com>
> Sent: Friday, December 11, 2020 4:01 PM
> To: devel@edk2.groups.io
> Cc: Wu, Hao A <hao.a.wu@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Bret Barkelew
> <Bret.Barkelew@microsoft.com>
> Subject: [Patch v4 0/2] MdeModulePkg/Variable/RuntimeDxe: Restore
> Variable Lock Protocol behavior
> 
> New in V4
> ==========
> * Fix spelling in unit tests
> * Call ValidateSetVariable() with DataSize=0, Attributes=0
> 
> New in V3
> ==========
> * Split into 2 patches.  One for code change.  Second for unit tests.
> * Remove duplicate code and use ValidateSetVariable() to detect if a
>   variable is already locked.
> 
> https://bugzilla.tianocore.org/show_bug.cgi?id=3111
> 
> The VariableLock shim currently fails if called twice because the underlying
> Variable Policy engine returns an error if a policy is set on an existing variable.
> 
> This breaks existing code which expect it to silently pass if a variable is locked
> multiple times (because it should "be locked").
> 
> Refactor the shim to confirm that the variable is indeed locked and then
> change the error to EFI_SUCCESS and generate a DEBUG_ERROR message so
> the duplicate lock can be reported in a debug log and removed.
> 
> Add host based unit tests for the multiple lock case using Variable Lock
> Protocol, Variable Policy Protocol, and mixes of Variable Lock Protocol and
> Variable Policy Protocol.
> 
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Hao A Wu <hao.a.wu@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Signed-off-by: Bret Barkelew <Bret.Barkelew@microsoft.com>
> 
> Bret Barkelew (1):
>   MdeModulePkg/Variable/RuntimeDxe: Restore Variable Lock Protocol
>     behavior
> 
> Michael D Kinney (1):
>   MdeModulePkg/Variable/RuntimeDxe: Add Variable Lock Protocol Unit
>     Tests
> 
>  MdeModulePkg/Test/MdeModulePkgHostTest.dsc    |  11 +
>  .../VariableLockRequestToLockUnitTest.c       | 565 ++++++++++++++++++
>  .../VariableLockRequestToLockUnitTest.inf     |  36 ++
>  .../RuntimeDxe/VariableLockRequestToLock.c    |  95 +--
>  4 files changed, 671 insertions(+), 36 deletions(-)  create mode 100644
> MdeModulePkg/Universal/Variable/RuntimeDxe/RuntimeDxeUnitTest/Vari
> ableLockRequestToLockUnitTest.c
>  create mode 100644
> MdeModulePkg/Universal/Variable/RuntimeDxe/RuntimeDxeUnitTest/Vari
> ableLockRequestToLockUnitTest.inf
> 
> --
> 2.29.2.windows.2


      parent reply	other threads:[~2020-12-11  8:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-11  8:01 [Patch v4 0/2] MdeModulePkg/Variable/RuntimeDxe: Restore Variable Lock Protocol behavior Michael D Kinney
2020-12-11  8:01 ` [Patch v4 1/2] " Michael D Kinney
2020-12-14  1:39   ` 回复: [edk2-devel] " gaoliming
2020-12-11  8:01 ` [Patch v4 2/2] MdeModulePkg/Variable/RuntimeDxe: Add Variable Lock Protocol Unit Tests Michael D Kinney
2020-12-14  1:56   ` 回复: [edk2-devel] " gaoliming
2020-12-14 17:52     ` Michael D Kinney
2020-12-15  0:56       ` 回复: " gaoliming
2020-12-11  8:12 ` Wu, Hao A [this message]

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=BN8PR11MB36663371FC0763F744562854CACA0@BN8PR11MB3666.namprd11.prod.outlook.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