Skip to content

Commit 70165fa

Browse files
mxu9mergify[bot]
authored andcommitted
OvmfPkg/NvVarsFileLib: Shortcut ConnectNvVarsToFileSystem in secure-boot
OvmfPkg/Library/NvVarsFileLib allows loading variables into emulated varstore from a on-disk NvVars file. We can't allow that when secure boot is active. So check secure-boot feature and shortcut the ConnectNvVarsToFileSystem() function when sb is enabled. Cc: Erdem Aktas <erdemaktas@google.com> Cc: James Bottomley <jejb@linux.ibm.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Suggested-by: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Min Xu <min.m.xu@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
1 parent ee91d9e commit 70165fa

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ ConnectNvVarsToFileSystem (
2828
IN EFI_HANDLE FsHandle
2929
)
3030
{
31+
#ifdef SECURE_BOOT_FEATURE_ENABLED
32+
33+
return EFI_UNSUPPORTED;
34+
35+
#else
36+
3137
EFI_STATUS Status;
3238

3339
//
@@ -46,6 +52,7 @@ ConnectNvVarsToFileSystem (
4652
}
4753

4854
return Status;
55+
#endif
4956
}
5057

5158
/**

0 commit comments

Comments
 (0)