]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg/Variable/RuntimeDxe: delete & lock MOR in the absence of SMM
authorLaszlo Ersek <lersek@redhat.com>
Tue, 10 Oct 2017 11:44:16 +0000 (13:44 +0200)
committerLaszlo Ersek <lersek@redhat.com>
Wed, 25 Oct 2017 12:06:15 +0000 (14:06 +0200)
commit704b71d7e11f115a3b5b03471d6420a7a70f1585
tree56df1400f0869e8e6c3fcbc7257d2a24d393aa7f
parent6161123be237719069973836c6f58f625c95f6b7
MdeModulePkg/Variable/RuntimeDxe: delete & lock MOR in the absence of SMM

VariableRuntimeDxe deletes and locks the MorLock variable in
MorLockInit(), with the argument that any protection provided by MorLock
can be circumvented if MorLock can be overwritten by unprivileged code
(i.e., outside of SMM).

Extend the argument and the logic to the MOR variable, which is supposed
to be protected by MorLock. Pass Attributes=0 when deleting MorLock and
MOR both.

This change was suggested by Star; it is inspired by earlier VariableSmm
commit fda8f631edbb ("MdeModulePkg/Variable/RuntimeDxe: delete and lock
OS-created MOR variable", 2017-10-03).

Cc: Eric Dong <eric.dong@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Suggested-by: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockDxe.c