Hi Chester,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on efi/next]
[also build test WARNING on arm64/for-next/core integrity/next-integrity v5.10-rc1
next-20201030]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url:
https://github.com/0day-ci/linux/commits/Chester-Lin/add-ima_arch-support...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git next
config: i386-randconfig-c001-20201030 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
#
https://github.com/0day-ci/linux/commit/945001ead079043268e8ad1b9d1df9bd5...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Chester-Lin/add-ima_arch-support-for-ARM64/20201030-141043
git checkout 945001ead079043268e8ad1b9d1df9bd5cabf020
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/x86/boot/compressed/acpi.c:8:
include/linux/efi.h: In function 'efi_get_secureboot':
> include/linux/efi.h:1103:19: warning: passing argument 1 of
'get_var' from incompatible pointer type [-Wincompatible-pointer-types]
1103 | status = get_var(L"SecureBoot", &var_guid, NULL, &size,
&secboot);
| ^~~~~~~~~~~~~
| |
| long int *
include/linux/efi.h:1103:19: note: expected 'efi_char16_t *' {aka 'short
unsigned int *'} but argument is of type 'long int *'
include/linux/efi.h:1111:19: warning: passing argument 1 of 'get_var' from
incompatible pointer type [-Wincompatible-pointer-types]
1111 | status = get_var(L"SetupMode", &var_guid, NULL, &size,
&setupmode);
| ^~~~~~~~~~~~
| |
| long int *
include/linux/efi.h:1111:19: note: expected 'efi_char16_t *' {aka 'short
unsigned int *'} but argument is of type 'long int *'
include/linux/efi.h:1124:19: warning: passing argument 1 of 'get_var' from
incompatible pointer type [-Wincompatible-pointer-types]
1124 | status = get_var(L"MokSBState", &shim_guid, &attr,
&size, &moksbstate);
| ^~~~~~~~~~~~~
| |
| long int *
include/linux/efi.h:1124:19: note: expected 'efi_char16_t *' {aka 'short
unsigned int *'} but argument is of type 'long int *'
vim +/get_var +1103 include/linux/efi.h
1092
1093 static inline enum efi_secureboot_mode efi_get_secureboot(efi_get_variable_t
*get_var)
1094 {
1095 efi_guid_t var_guid = EFI_GLOBAL_VARIABLE_GUID;
1096 efi_guid_t shim_guid = EFI_SHIM_LOCK_GUID;
1097 efi_status_t status;
1098 unsigned long size;
1099 u8 secboot, setupmode, moksbstate;
1100 u32 attr;
1101
1102 size = sizeof(secboot);
1103 status = get_var(L"SecureBoot", &var_guid, NULL,
&size, &secboot);
1104
1105 if (status == EFI_NOT_FOUND)
1106 return efi_secureboot_mode_disabled;
1107 if (status != EFI_SUCCESS)
1108 return efi_secureboot_mode_unknown;
1109
1110 size = sizeof(setupmode);
1111 status = get_var(L"SetupMode", &var_guid, NULL, &size,
&setupmode);
1112
1113 if (status != EFI_SUCCESS)
1114 return efi_secureboot_mode_unknown;
1115 if (secboot == 0 || setupmode == 1)
1116 return efi_secureboot_mode_disabled;
1117
1118 /*
1119 * See if a user has put the shim into insecure mode. If so, and if the
1120 * variable doesn't have the runtime attribute set, we might as well
1121 * honor that.
1122 */
1123 size = sizeof(moksbstate);
1124 status = get_var(L"MokSBState", &shim_guid, &attr, &size,
&moksbstate);
1125 /* If it fails, we don't care why. Default to secure */
1126 if (status == EFI_SUCCESS && moksbstate == 1
1127 && !(attr & EFI_VARIABLE_RUNTIME_ACCESS))
1128 return efi_secureboot_mode_disabled;
1129
1130 return efi_secureboot_mode_enabled;
1131 }
1132
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org