Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: a18a9bde36d2ffc12df29cdced1efa1f8f9f2021
      
https://github.com/tianocore/edk2/commit/a18a9bde36d2ffc12df29cdced1efa1f8f9f2021
  Author: Bret Barkelew <bret.barke...@microsoft.com>
  Date:   2020-12-15 (Tue, 15 Dec 2020)

  Changed paths:
    M MdeModulePkg/Universal/Variable/RuntimeDxe/VariableLockRequestToLock.c

  Log Message:
  -----------
  MdeModulePkg/Variable/RuntimeDxe: Restore Variable Lock Protocol behavior

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.

Cc: Michael D Kinney <michael.d.kin...@intel.com>
Cc: Hao A Wu <hao.a...@intel.com>
Cc: Liming Gao <gaolim...@byosoft.com.cn>
Signed-off-by: Bret Barkelew <bret.barke...@microsoft.com>
Reviewed-by: Hao A Wu <hao.a...@intel.com>
Reviewed-by: Liming Gao <gaolim...@byosoft.com.cn>
Reviewed-by: Michael D Kinney <michael.d.kin...@intel.com>


  Commit: dcaa93936591883aa7826eb45ef00416ad82ef08
      
https://github.com/tianocore/edk2/commit/dcaa93936591883aa7826eb45ef00416ad82ef08
  Author: Michael D Kinney <michael.d.kin...@intel.com>
  Date:   2020-12-15 (Tue, 15 Dec 2020)

  Changed paths:
    M MdeModulePkg/Test/MdeModulePkgHostTest.dsc
    A 
MdeModulePkg/Universal/Variable/RuntimeDxe/RuntimeDxeUnitTest/VariableLockRequestToLockUnitTest.c
    A 
MdeModulePkg/Universal/Variable/RuntimeDxe/RuntimeDxeUnitTest/VariableLockRequestToLockUnitTest.inf

  Log Message:
  -----------
  MdeModulePkg/Variable/RuntimeDxe: Add Variable Lock Protocol Unit Tests

https://bugzilla.tianocore.org/show_bug.cgi?id=3111

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.kin...@intel.com>
Cc: Hao A Wu <hao.a...@intel.com>
Cc: Liming Gao <gaolim...@byosoft.com.cn>
Signed-off-by: Bret Barkelew <bret.barke...@microsoft.com>
Reviewed-by: Hao A Wu <hao.a...@intel.com>
Reviewed-by: Liming Gao <gaolim...@byosoft.com.cn>
Reviewed-by: Michael D Kinney <michael.d.kin...@intel.com>


Compare: https://github.com/tianocore/edk2/compare/be746104d176...dcaa93936591


_______________________________________________
edk2-commits mailing list
edk2-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to