All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v3 1/3] efi: generalize efi_get_secureboot
Date: Sat, 31 Oct 2020 10:39:52 +0800	[thread overview]
Message-ID: <202010311030.QocsBAk0-lkp@intel.com> (raw)
In-Reply-To: <20201030060840.1810-2-clin@suse.com>

[-- Attachment #1: Type: text/plain, Size: 4544 bytes --]

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-for-ARM64/20201030-141043
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/945001ead079043268e8ad1b9d1df9bd5cabf020
        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@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(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 27122 bytes --]

  parent reply	other threads:[~2020-10-31  2:39 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-30  6:08 [PATCH v3 0/3] add ima_arch support for ARM64 Chester Lin
2020-10-30  6:08 ` Chester Lin
2020-10-30  6:08 ` [PATCH v3 1/3] efi: generalize efi_get_secureboot Chester Lin
2020-10-30  6:08   ` Chester Lin
2020-10-30 11:51   ` Ard Biesheuvel
2020-10-30 11:51     ` Ard Biesheuvel
2020-11-02  5:30     ` Chester Lin
2020-11-02  5:30       ` Chester Lin
2020-10-31  2:39   ` kernel test robot [this message]
2020-11-02 13:03   ` kernel test robot
2020-11-04  4:20   ` kernel test robot
2020-10-30  6:08 ` [PATCH v3 2/3] ima: replace arch-specific get_sb_mode() with a common helper ima_get_efi_secureboot() Chester Lin
2020-10-30  6:08   ` Chester Lin
2020-10-30 11:52   ` Ard Biesheuvel
2020-10-30 11:52     ` Ard Biesheuvel
2020-10-30  6:08 ` [PATCH v3 3/3] arm64/ima: add ima_arch support Chester Lin
2020-10-30  6:08   ` Chester Lin
2020-10-30 11:53   ` Ard Biesheuvel
2020-10-30 11:53     ` Ard Biesheuvel
2020-11-02  7:20     ` Chester Lin
2020-11-02  7:20       ` Chester Lin
2020-11-02 12:13       ` Mimi Zohar
2020-11-02 12:13         ` Mimi Zohar
     [not found] <975b1b2c05fdbd73f25b09b85d6a23370e557536.camel@linux.ibm.com>
2020-11-04 18:52 ` [PATCH v3 1/3] efi: generalize efi_get_secureboot Ard Biesheuvel
2020-11-05  7:10   ` Philip Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202010311030.QocsBAk0-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.