lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Mon, 17 Oct 2022 17:26:02 +0800
From:   kernel test robot <lkp@...el.com>
To:     Ard Biesheuvel <ardb@...nel.org>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org
Subject: [ardb:for-kernelci 28/35]
 drivers/firmware/efi/libstub/x86-stub.c:448:17: error: conflicting types for
 'efi_stub_entry'

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git for-kernelci
head:   bf1830a27c8d6916637f2df1d9ff68812fb25cf9
commit: 5adc413c093edd9b39745cd0873aa44f4a799ad0 [28/35] efi: libstub: Factor out EFI stub entrypoint into separate file
config: x86_64-randconfig-a012
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/commit/?id=5adc413c093edd9b39745cd0873aa44f4a799ad0
        git remote add ardb git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git
        git fetch --no-tags ardb for-kernelci
        git checkout 5adc413c093edd9b39745cd0873aa44f4a799ad0
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

>> drivers/firmware/efi/libstub/x86-stub.c:448:17: error: conflicting types for 'efi_stub_entry'
   void __noreturn efi_stub_entry(efi_handle_t handle,
                   ^
   drivers/firmware/efi/libstub/efistub.h:1014:14: note: previous declaration is here
   efi_status_t efi_stub_entry(efi_handle_t handle,
                ^
>> drivers/firmware/efi/libstub/x86-stub.c:526:51: error: too few arguments to function call, expected 4, have 3
           efi_stub_entry(handle, sys_table_arg, boot_params);
           ~~~~~~~~~~~~~~                                   ^
   drivers/firmware/efi/libstub/efistub.h:1014:14: note: 'efi_stub_entry' declared here
   efi_status_t efi_stub_entry(efi_handle_t handle,
                ^
   2 errors generated.


vim +/efi_stub_entry +448 drivers/firmware/efi/libstub/x86-stub.c

3b8f44fc0810d5 drivers/firmware/efi/libstub/x86-stub.c Ard Biesheuvel 2020-02-16  447  
c3710de5065d63 arch/x86/boot/compressed/eboot.c        Ard Biesheuvel 2019-12-24 @448  void __noreturn efi_stub_entry(efi_handle_t handle,
c3710de5065d63 arch/x86/boot/compressed/eboot.c        Ard Biesheuvel 2019-12-24  449  			       efi_system_table_t *sys_table_arg,
c3710de5065d63 arch/x86/boot/compressed/eboot.c        Ard Biesheuvel 2019-12-24  450  			       struct boot_params *boot_params);
c3710de5065d63 arch/x86/boot/compressed/eboot.c        Ard Biesheuvel 2019-12-24  451  
291f36325f9f25 arch/x86/boot/compressed/eboot.c        Matt Fleming   2011-12-12  452  /*
291f36325f9f25 arch/x86/boot/compressed/eboot.c        Matt Fleming   2011-12-12  453   * Because the x86 boot code expects to be passed a boot_params we
291f36325f9f25 arch/x86/boot/compressed/eboot.c        Matt Fleming   2011-12-12  454   * need to create one ourselves (usually the bootloader would create
291f36325f9f25 arch/x86/boot/compressed/eboot.c        Matt Fleming   2011-12-12  455   * one for us).
291f36325f9f25 arch/x86/boot/compressed/eboot.c        Matt Fleming   2011-12-12  456   */
c3710de5065d63 arch/x86/boot/compressed/eboot.c        Ard Biesheuvel 2019-12-24  457  efi_status_t __efiapi efi_pe_entry(efi_handle_t handle,
c3710de5065d63 arch/x86/boot/compressed/eboot.c        Ard Biesheuvel 2019-12-24  458  				   efi_system_table_t *sys_table_arg)
291f36325f9f25 arch/x86/boot/compressed/eboot.c        Matt Fleming   2011-12-12  459  {
9ca8f72a9297f2 arch/x86/boot/compressed/eboot.c        Matt Fleming   2012-07-19  460  	struct boot_params *boot_params;
9ca8f72a9297f2 arch/x86/boot/compressed/eboot.c        Matt Fleming   2012-07-19  461  	struct setup_header *hdr;
1887c9b653f995 drivers/firmware/efi/libstub/x86-stub.c Arvind Sankar  2020-03-08  462  	void *image_base;
9ca8f72a9297f2 arch/x86/boot/compressed/eboot.c        Matt Fleming   2012-07-19  463  	efi_guid_t proto = LOADED_IMAGE_PROTOCOL_GUID;
291f36325f9f25 arch/x86/boot/compressed/eboot.c        Matt Fleming   2011-12-12  464  	int options_size = 0;
291f36325f9f25 arch/x86/boot/compressed/eboot.c        Matt Fleming   2011-12-12  465  	efi_status_t status;
5fef3870c572a3 arch/x86/boot/compressed/eboot.c        Roy Franz      2013-09-22  466  	char *cmdline_ptr;
291f36325f9f25 arch/x86/boot/compressed/eboot.c        Matt Fleming   2011-12-12  467  
ccc27ae7749425 drivers/firmware/efi/libstub/x86-stub.c Ard Biesheuvel 2020-04-16  468  	efi_system_table = sys_table_arg;
9ca8f72a9297f2 arch/x86/boot/compressed/eboot.c        Matt Fleming   2012-07-19  469  
9ca8f72a9297f2 arch/x86/boot/compressed/eboot.c        Matt Fleming   2012-07-19  470  	/* Check if we were booted by the EFI firmware */
ccc27ae7749425 drivers/firmware/efi/libstub/x86-stub.c Ard Biesheuvel 2020-04-16  471  	if (efi_system_table->hdr.signature != EFI_SYSTEM_TABLE_SIGNATURE)
3b8f44fc0810d5 drivers/firmware/efi/libstub/x86-stub.c Ard Biesheuvel 2020-02-16  472  		efi_exit(handle, EFI_INVALID_PARAMETER);
54b52d87268034 arch/x86/boot/compressed/eboot.c        Matt Fleming   2014-01-10  473  
0347d8c28cbbfd drivers/firmware/efi/libstub/x86-stub.c Arvind Sankar  2020-03-08  474  	status = efi_bs_call(handle_protocol, handle, &proto, (void **)&image);
9ca8f72a9297f2 arch/x86/boot/compressed/eboot.c        Matt Fleming   2012-07-19  475  	if (status != EFI_SUCCESS) {
36bdd0a78d5683 drivers/firmware/efi/libstub/x86-stub.c Arvind Sankar  2020-04-30  476  		efi_err("Failed to get handle for LOADED_IMAGE_PROTOCOL\n");
3b8f44fc0810d5 drivers/firmware/efi/libstub/x86-stub.c Ard Biesheuvel 2020-02-16  477  		efi_exit(handle, status);
9ca8f72a9297f2 arch/x86/boot/compressed/eboot.c        Matt Fleming   2012-07-19  478  	}
9ca8f72a9297f2 arch/x86/boot/compressed/eboot.c        Matt Fleming   2012-07-19  479  
1887c9b653f995 drivers/firmware/efi/libstub/x86-stub.c Arvind Sankar  2020-03-08  480  	image_base = efi_table_attr(image, image_base);
1887c9b653f995 drivers/firmware/efi/libstub/x86-stub.c Arvind Sankar  2020-03-08  481  	image_offset = (void *)startup_32 - image_base;
1887c9b653f995 drivers/firmware/efi/libstub/x86-stub.c Arvind Sankar  2020-03-08  482  
019512f1fd3736 drivers/firmware/efi/libstub/x86-stub.c Arvind Sankar  2020-04-30  483  	status = efi_allocate_pages(sizeof(struct boot_params),
019512f1fd3736 drivers/firmware/efi/libstub/x86-stub.c Arvind Sankar  2020-04-30  484  				    (unsigned long *)&boot_params, ULONG_MAX);
9ca8f72a9297f2 arch/x86/boot/compressed/eboot.c        Matt Fleming   2012-07-19  485  	if (status != EFI_SUCCESS) {
36bdd0a78d5683 drivers/firmware/efi/libstub/x86-stub.c Arvind Sankar  2020-04-30  486  		efi_err("Failed to allocate lowmem for boot params\n");
3b8f44fc0810d5 drivers/firmware/efi/libstub/x86-stub.c Ard Biesheuvel 2020-02-16  487  		efi_exit(handle, status);
9ca8f72a9297f2 arch/x86/boot/compressed/eboot.c        Matt Fleming   2012-07-19  488  	}
9ca8f72a9297f2 arch/x86/boot/compressed/eboot.c        Matt Fleming   2012-07-19  489  
019512f1fd3736 drivers/firmware/efi/libstub/x86-stub.c Arvind Sankar  2020-04-30  490  	memset(boot_params, 0x0, sizeof(struct boot_params));
9ca8f72a9297f2 arch/x86/boot/compressed/eboot.c        Matt Fleming   2012-07-19  491  
9ca8f72a9297f2 arch/x86/boot/compressed/eboot.c        Matt Fleming   2012-07-19  492  	hdr = &boot_params->hdr;
9ca8f72a9297f2 arch/x86/boot/compressed/eboot.c        Matt Fleming   2012-07-19  493  
59476f80d8781a drivers/firmware/efi/libstub/x86-stub.c Arvind Sankar  2020-06-18  494  	/* Copy the setup header from the second sector to boot_params */
59476f80d8781a drivers/firmware/efi/libstub/x86-stub.c Arvind Sankar  2020-06-18  495  	memcpy(&hdr->jump, image_base + 512,
59476f80d8781a drivers/firmware/efi/libstub/x86-stub.c Arvind Sankar  2020-06-18  496  	       sizeof(struct setup_header) - offsetof(struct setup_header, jump));
9ca8f72a9297f2 arch/x86/boot/compressed/eboot.c        Matt Fleming   2012-07-19  497  
9ca8f72a9297f2 arch/x86/boot/compressed/eboot.c        Matt Fleming   2012-07-19  498  	/*
9ca8f72a9297f2 arch/x86/boot/compressed/eboot.c        Matt Fleming   2012-07-19  499  	 * Fill out some of the header fields ourselves because the
9ca8f72a9297f2 arch/x86/boot/compressed/eboot.c        Matt Fleming   2012-07-19  500  	 * EFI firmware loader doesn't load the first sector.
9ca8f72a9297f2 arch/x86/boot/compressed/eboot.c        Matt Fleming   2012-07-19  501  	 */
9ca8f72a9297f2 arch/x86/boot/compressed/eboot.c        Matt Fleming   2012-07-19  502  	hdr->root_flags	= 1;
9ca8f72a9297f2 arch/x86/boot/compressed/eboot.c        Matt Fleming   2012-07-19  503  	hdr->vid_mode	= 0xffff;
9ca8f72a9297f2 arch/x86/boot/compressed/eboot.c        Matt Fleming   2012-07-19  504  	hdr->boot_flag	= 0xAA55;
9ca8f72a9297f2 arch/x86/boot/compressed/eboot.c        Matt Fleming   2012-07-19  505  
291f36325f9f25 arch/x86/boot/compressed/eboot.c        Matt Fleming   2011-12-12  506  	hdr->type_of_loader = 0x21;
291f36325f9f25 arch/x86/boot/compressed/eboot.c        Matt Fleming   2011-12-12  507  
291f36325f9f25 arch/x86/boot/compressed/eboot.c        Matt Fleming   2011-12-12  508  	/* Convert unicode cmdline to ascii */
27cd5511feffea drivers/firmware/efi/libstub/x86-stub.c Ard Biesheuvel 2020-05-19  509  	cmdline_ptr = efi_convert_cmdline(image, &options_size);
5fef3870c572a3 arch/x86/boot/compressed/eboot.c        Roy Franz      2013-09-22  510  	if (!cmdline_ptr)
291f36325f9f25 arch/x86/boot/compressed/eboot.c        Matt Fleming   2011-12-12  511  		goto fail;
90a2186b7df183 arch/x86/boot/compressed/eboot.c        Ingo Molnar    2018-07-11  512  
eed4e0193ee7b0 drivers/firmware/efi/libstub/x86-stub.c Arvind Sankar  2020-04-30  513  	efi_set_u64_split((unsigned long)cmdline_ptr,
eed4e0193ee7b0 drivers/firmware/efi/libstub/x86-stub.c Arvind Sankar  2020-04-30  514  			  &hdr->cmd_line_ptr, &boot_params->ext_cmd_line_ptr);
291f36325f9f25 arch/x86/boot/compressed/eboot.c        Matt Fleming   2011-12-12  515  
291f36325f9f25 arch/x86/boot/compressed/eboot.c        Matt Fleming   2011-12-12  516  	hdr->ramdisk_image = 0;
291f36325f9f25 arch/x86/boot/compressed/eboot.c        Matt Fleming   2011-12-12  517  	hdr->ramdisk_size = 0;
291f36325f9f25 arch/x86/boot/compressed/eboot.c        Matt Fleming   2011-12-12  518  
63bf28ceb3ebbe drivers/firmware/efi/libstub/x86-stub.c Ard Biesheuvel 2022-08-04  519  	/*
63bf28ceb3ebbe drivers/firmware/efi/libstub/x86-stub.c Ard Biesheuvel 2022-08-04  520  	 * Disregard any setup data that was provided by the bootloader:
63bf28ceb3ebbe drivers/firmware/efi/libstub/x86-stub.c Ard Biesheuvel 2022-08-04  521  	 * setup_data could be pointing anywhere, and we have no way of
63bf28ceb3ebbe drivers/firmware/efi/libstub/x86-stub.c Ard Biesheuvel 2022-08-04  522  	 * authenticating or validating the payload.
63bf28ceb3ebbe drivers/firmware/efi/libstub/x86-stub.c Ard Biesheuvel 2022-08-04  523  	 */
63bf28ceb3ebbe drivers/firmware/efi/libstub/x86-stub.c Ard Biesheuvel 2022-08-04  524  	hdr->setup_data = 0;
63bf28ceb3ebbe drivers/firmware/efi/libstub/x86-stub.c Ard Biesheuvel 2022-08-04  525  
ccc27ae7749425 drivers/firmware/efi/libstub/x86-stub.c Ard Biesheuvel 2020-04-16 @526  	efi_stub_entry(handle, sys_table_arg, boot_params);
c3710de5065d63 arch/x86/boot/compressed/eboot.c        Ard Biesheuvel 2019-12-24  527  	/* not reached */
90a2186b7df183 arch/x86/boot/compressed/eboot.c        Ingo Molnar    2018-07-11  528  
9ca8f72a9297f2 arch/x86/boot/compressed/eboot.c        Matt Fleming   2012-07-19  529  fail:
019512f1fd3736 drivers/firmware/efi/libstub/x86-stub.c Arvind Sankar  2020-04-30  530  	efi_free(sizeof(struct boot_params), (unsigned long)boot_params);
90a2186b7df183 arch/x86/boot/compressed/eboot.c        Ingo Molnar    2018-07-11  531  
3b8f44fc0810d5 drivers/firmware/efi/libstub/x86-stub.c Ard Biesheuvel 2020-02-16  532  	efi_exit(handle, status);
9ca8f72a9297f2 arch/x86/boot/compressed/eboot.c        Matt Fleming   2012-07-19  533  }
9ca8f72a9297f2 arch/x86/boot/compressed/eboot.c        Matt Fleming   2012-07-19  534  

:::::: The code at line 448 was first introduced by commit
:::::: c3710de5065d63f8b16d160a118cc50ae09050b4 efi/libstub/x86: Drop __efi_early() export and efi_config struct

:::::: TO: Ard Biesheuvel <ardb@...nel.org>
:::::: CC: Ingo Molnar <mingo@...nel.org>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (163370 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ