Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\ima_arch.c Create Date:2022-07-28 08:53:46
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:get_sb_mode

Proto:static enum efi_secureboot_mode get_sb_mode(void)

Type:enum efi_secureboot_mode

Parameter:Nothing

13  efi_variable_guid = EFI_GLOBAL_VARIABLE_GUID
18  size = size of secboot
20  If Not efi_enabled(Can we use runtime services? ) Then
21  pr_info("ima: secureboot mode unknown, no efi\n")
22  Return efi_secureboot_mode_unknown
26  status = get_variable("SecureBoot", & efi_variable_guid, NULL, & size, & secboot)
28  If status == EFI_NOT_FOUND Then
29  pr_info("ima: secureboot mode disabled\n")
30  Return efi_secureboot_mode_disabled
33  If status != EFI_SUCCESS Then
34  pr_info("ima: secureboot mode unknown\n")
35  Return efi_secureboot_mode_unknown
38  size = size of setupmode
39  status = get_variable("SetupMode", & efi_variable_guid, NULL, & size, & setupmode)
42  If status != EFI_SUCCESS Then setupmode = 0
45  If secboot == 0 || setupmode == 1 Then
46  pr_info("ima: secureboot mode disabled\n")
47  Return efi_secureboot_mode_disabled
50  pr_info("ima: secureboot mode enabled\n")
51  Return efi_secureboot_mode_enabled
Caller
NameDescribe
arch_ima_get_secureboot