From: kbuild test robot <lkp@intel.com>
To: Arvind Sankar <nivedita@alum.mit.edu>, Ard Biesheuvel <ardb@kernel.org>
Cc: kbuild-all@lists.01.org, linux-efi@vger.kernel.org,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 02/10] efi: Add a helper function to split 64-bit values
Date: Thu, 30 Apr 2020 07:51:01 +0800 [thread overview]
Message-ID: <202004300731.4b6aZLP7%lkp@intel.com> (raw)
In-Reply-To: <20200429174120.1497212-3-nivedita@alum.mit.edu>
[-- Attachment #1: Type: text/plain, Size: 5417 bytes --]
Hi Arvind,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on efi/next]
[also build test WARNING on next-20200429]
[cannot apply to v5.7-rc3]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Arvind-Sankar/efi-some-cleanups-refactoring-for-efi-next/20200430-051025
base: https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git next
config: i386-defconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/firmware/efi/libstub/x86-stub.c: In function 'efi_pe_entry':
>> drivers/firmware/efi/libstub/x86-stub.c:411:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
efi_set_u64_split((u64)cmdline_ptr,
^
drivers/firmware/efi/libstub/x86-stub.c: In function 'exit_boot_func':
drivers/firmware/efi/libstub/x86-stub.c:641:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
efi_set_u64_split((u64)efi_system_table,
^
drivers/firmware/efi/libstub/x86-stub.c:645:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
efi_set_u64_split((u64)*map->map,
^
vim +411 drivers/firmware/efi/libstub/x86-stub.c
343
344 void __noreturn efi_stub_entry(efi_handle_t handle,
345 efi_system_table_t *sys_table_arg,
346 struct boot_params *boot_params);
347
348 /*
349 * Because the x86 boot code expects to be passed a boot_params we
350 * need to create one ourselves (usually the bootloader would create
351 * one for us).
352 */
353 efi_status_t __efiapi efi_pe_entry(efi_handle_t handle,
354 efi_system_table_t *sys_table_arg)
355 {
356 struct boot_params *boot_params;
357 struct setup_header *hdr;
358 efi_loaded_image_t *image;
359 void *image_base;
360 efi_guid_t proto = LOADED_IMAGE_PROTOCOL_GUID;
361 int options_size = 0;
362 efi_status_t status;
363 char *cmdline_ptr;
364 unsigned long ramdisk_addr;
365 unsigned long ramdisk_size;
366
367 efi_system_table = sys_table_arg;
368
369 /* Check if we were booted by the EFI firmware */
370 if (efi_system_table->hdr.signature != EFI_SYSTEM_TABLE_SIGNATURE)
371 efi_exit(handle, EFI_INVALID_PARAMETER);
372
373 status = efi_bs_call(handle_protocol, handle, &proto, (void **)&image);
374 if (status != EFI_SUCCESS) {
375 efi_printk("Failed to get handle for LOADED_IMAGE_PROTOCOL\n");
376 efi_exit(handle, status);
377 }
378
379 image_base = efi_table_attr(image, image_base);
380 image_offset = (void *)startup_32 - image_base;
381
382 status = efi_allocate_pages(sizeof(struct boot_params),
383 (unsigned long *)&boot_params, ULONG_MAX);
384 if (status != EFI_SUCCESS) {
385 efi_printk("Failed to allocate lowmem for boot params\n");
386 efi_exit(handle, status);
387 }
388
389 memset(boot_params, 0x0, sizeof(struct boot_params));
390
391 hdr = &boot_params->hdr;
392
393 /* Copy the second sector to boot_params */
394 memcpy(&hdr->jump, image_base + 512, 512);
395
396 /*
397 * Fill out some of the header fields ourselves because the
398 * EFI firmware loader doesn't load the first sector.
399 */
400 hdr->root_flags = 1;
401 hdr->vid_mode = 0xffff;
402 hdr->boot_flag = 0xAA55;
403
404 hdr->type_of_loader = 0x21;
405
406 /* Convert unicode cmdline to ascii */
407 cmdline_ptr = efi_convert_cmdline(image, &options_size, ULONG_MAX);
408 if (!cmdline_ptr)
409 goto fail;
410
> 411 efi_set_u64_split((u64)cmdline_ptr,
412 &hdr->cmd_line_ptr, &boot_params->ext_cmd_line_ptr);
413
414 hdr->ramdisk_image = 0;
415 hdr->ramdisk_size = 0;
416
417 if (efi_is_native()) {
418 status = efi_parse_options(cmdline_ptr);
419 if (status != EFI_SUCCESS)
420 goto fail2;
421
422 if (!efi_noinitrd) {
423 status = efi_load_initrd(image, &ramdisk_addr,
424 &ramdisk_size,
425 hdr->initrd_addr_max,
426 ULONG_MAX);
427 if (status != EFI_SUCCESS)
428 goto fail2;
429 efi_set_u64_split(ramdisk_addr, &hdr->ramdisk_image,
430 &boot_params->ext_ramdisk_image);
431 efi_set_u64_split(ramdisk_size, &hdr->ramdisk_size,
432 &boot_params->ext_ramdisk_size);
433 }
434 }
435
436 efi_stub_entry(handle, sys_table_arg, boot_params);
437 /* not reached */
438
439 fail2:
440 efi_free(options_size, (unsigned long)cmdline_ptr);
441 fail:
442 efi_free(sizeof(struct boot_params), (unsigned long)boot_params);
443
444 efi_exit(handle, status);
445 }
446
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28397 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 02/10] efi: Add a helper function to split 64-bit values
Date: Thu, 30 Apr 2020 07:51:01 +0800 [thread overview]
Message-ID: <202004300731.4b6aZLP7%lkp@intel.com> (raw)
In-Reply-To: <20200429174120.1497212-3-nivedita@alum.mit.edu>
[-- Attachment #1: Type: text/plain, Size: 5565 bytes --]
Hi Arvind,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on efi/next]
[also build test WARNING on next-20200429]
[cannot apply to v5.7-rc3]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Arvind-Sankar/efi-some-cleanups-refactoring-for-efi-next/20200430-051025
base: https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git next
config: i386-defconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/firmware/efi/libstub/x86-stub.c: In function 'efi_pe_entry':
>> drivers/firmware/efi/libstub/x86-stub.c:411:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
efi_set_u64_split((u64)cmdline_ptr,
^
drivers/firmware/efi/libstub/x86-stub.c: In function 'exit_boot_func':
drivers/firmware/efi/libstub/x86-stub.c:641:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
efi_set_u64_split((u64)efi_system_table,
^
drivers/firmware/efi/libstub/x86-stub.c:645:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
efi_set_u64_split((u64)*map->map,
^
vim +411 drivers/firmware/efi/libstub/x86-stub.c
343
344 void __noreturn efi_stub_entry(efi_handle_t handle,
345 efi_system_table_t *sys_table_arg,
346 struct boot_params *boot_params);
347
348 /*
349 * Because the x86 boot code expects to be passed a boot_params we
350 * need to create one ourselves (usually the bootloader would create
351 * one for us).
352 */
353 efi_status_t __efiapi efi_pe_entry(efi_handle_t handle,
354 efi_system_table_t *sys_table_arg)
355 {
356 struct boot_params *boot_params;
357 struct setup_header *hdr;
358 efi_loaded_image_t *image;
359 void *image_base;
360 efi_guid_t proto = LOADED_IMAGE_PROTOCOL_GUID;
361 int options_size = 0;
362 efi_status_t status;
363 char *cmdline_ptr;
364 unsigned long ramdisk_addr;
365 unsigned long ramdisk_size;
366
367 efi_system_table = sys_table_arg;
368
369 /* Check if we were booted by the EFI firmware */
370 if (efi_system_table->hdr.signature != EFI_SYSTEM_TABLE_SIGNATURE)
371 efi_exit(handle, EFI_INVALID_PARAMETER);
372
373 status = efi_bs_call(handle_protocol, handle, &proto, (void **)&image);
374 if (status != EFI_SUCCESS) {
375 efi_printk("Failed to get handle for LOADED_IMAGE_PROTOCOL\n");
376 efi_exit(handle, status);
377 }
378
379 image_base = efi_table_attr(image, image_base);
380 image_offset = (void *)startup_32 - image_base;
381
382 status = efi_allocate_pages(sizeof(struct boot_params),
383 (unsigned long *)&boot_params, ULONG_MAX);
384 if (status != EFI_SUCCESS) {
385 efi_printk("Failed to allocate lowmem for boot params\n");
386 efi_exit(handle, status);
387 }
388
389 memset(boot_params, 0x0, sizeof(struct boot_params));
390
391 hdr = &boot_params->hdr;
392
393 /* Copy the second sector to boot_params */
394 memcpy(&hdr->jump, image_base + 512, 512);
395
396 /*
397 * Fill out some of the header fields ourselves because the
398 * EFI firmware loader doesn't load the first sector.
399 */
400 hdr->root_flags = 1;
401 hdr->vid_mode = 0xffff;
402 hdr->boot_flag = 0xAA55;
403
404 hdr->type_of_loader = 0x21;
405
406 /* Convert unicode cmdline to ascii */
407 cmdline_ptr = efi_convert_cmdline(image, &options_size, ULONG_MAX);
408 if (!cmdline_ptr)
409 goto fail;
410
> 411 efi_set_u64_split((u64)cmdline_ptr,
412 &hdr->cmd_line_ptr, &boot_params->ext_cmd_line_ptr);
413
414 hdr->ramdisk_image = 0;
415 hdr->ramdisk_size = 0;
416
417 if (efi_is_native()) {
418 status = efi_parse_options(cmdline_ptr);
419 if (status != EFI_SUCCESS)
420 goto fail2;
421
422 if (!efi_noinitrd) {
423 status = efi_load_initrd(image, &ramdisk_addr,
424 &ramdisk_size,
425 hdr->initrd_addr_max,
426 ULONG_MAX);
427 if (status != EFI_SUCCESS)
428 goto fail2;
429 efi_set_u64_split(ramdisk_addr, &hdr->ramdisk_image,
430 &boot_params->ext_ramdisk_image);
431 efi_set_u64_split(ramdisk_size, &hdr->ramdisk_size,
432 &boot_params->ext_ramdisk_size);
433 }
434 }
435
436 efi_stub_entry(handle, sys_table_arg, boot_params);
437 /* not reached */
438
439 fail2:
440 efi_free(options_size, (unsigned long)cmdline_ptr);
441 fail:
442 efi_free(sizeof(struct boot_params), (unsigned long)boot_params);
443
444 efi_exit(handle, status);
445 }
446
---
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: 28397 bytes --]
next prev parent reply other threads:[~2020-04-29 23:51 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-29 17:41 [PATCH 00/10] efi: some cleanups/refactoring for efi/next Arvind Sankar
2020-04-29 17:41 ` [PATCH 01/10] efi/x86: Use correct size for boot_params Arvind Sankar
2020-04-29 17:41 ` [PATCH 02/10] efi: Add a helper function to split 64-bit values Arvind Sankar
2020-04-29 23:51 ` kbuild test robot [this message]
2020-04-29 23:51 ` kbuild test robot
2020-04-29 17:41 ` [PATCH 02/10] efi/libstub: " Arvind Sankar
2020-04-29 17:41 ` [PATCH 03/10] efi/x86: Use pr_efi_err for error messages Arvind Sankar
2020-04-29 18:47 ` Joe Perches
2020-04-29 18:49 ` Ard Biesheuvel
2020-04-29 18:57 ` Joe Perches
2020-04-29 18:59 ` Ard Biesheuvel
2020-04-29 19:47 ` Joe Perches
2020-04-29 19:48 ` Ard Biesheuvel
2020-04-29 21:43 ` Arvind Sankar
2020-04-29 21:45 ` Ard Biesheuvel
2020-04-29 21:51 ` Arvind Sankar
2020-04-29 21:53 ` Joe Perches
2020-04-29 21:55 ` Ard Biesheuvel
2020-04-29 22:20 ` Arvind Sankar
2020-04-30 15:14 ` Ard Biesheuvel
2020-04-29 17:41 ` [PATCH 04/10] efi/gop: " Arvind Sankar
2020-04-29 17:41 ` [PATCH 05/10] efi/tpm: " Arvind Sankar
2020-04-29 17:41 ` [PATCH 06/10] efi/x86: Move command-line initrd loading to efi_main Arvind Sankar
2020-04-29 17:41 ` [PATCH 07/10] efi/libstub: Unify initrd loading across architectures Arvind Sankar
2020-04-29 17:41 ` [PATCH 08/10] efi/x86: Drop soft_limit for x86 initrd loading Arvind Sankar
2020-04-29 19:05 ` Ard Biesheuvel
2020-04-29 21:33 ` Arvind Sankar
2020-04-29 17:41 ` [PATCH 09/10] efi/x86: Support builtin command line Arvind Sankar
2020-04-29 19:07 ` Ard Biesheuvel
2020-04-29 21:39 ` Arvind Sankar
2020-04-29 21:40 ` Ard Biesheuvel
2020-04-29 21:48 ` Arvind Sankar
2020-04-29 21:51 ` Ard Biesheuvel
2020-04-29 17:41 ` [PATCH 10/10] efi/libstub: Check return value of efi_parse_options Arvind Sankar
2020-04-30 4:31 ` kbuild test robot
2020-04-30 4:31 ` kbuild test robot
2020-04-30 18:28 ` [PATCH v2 00/11] efi: some cleanups/refactoring for efi/next Arvind Sankar
2020-04-30 18:28 ` [PATCH v2 01/11] efi/x86: Use correct size for boot_params Arvind Sankar
2020-04-30 18:28 ` [PATCH v2 02/11] efi/libstub: Add a helper function to split 64-bit values Arvind Sankar
2020-04-30 18:28 ` [PATCH v2 03/11] efi/libstub: Move pr_efi/pr_efi_err into efi namespace Arvind Sankar
2020-04-30 18:28 ` [PATCH v2 04/11] efi/x86: Use efi_err for error messages Arvind Sankar
2020-04-30 18:28 ` [PATCH v2 05/11] efi/gop: " Arvind Sankar
2020-04-30 18:28 ` [PATCH v2 06/11] efi/tpm: " Arvind Sankar
2020-04-30 18:28 ` [PATCH v2 07/11] efi/libstub: Upgrade ignored dtb= argument message to error Arvind Sankar
2020-04-30 18:28 ` [PATCH v2 08/11] efi/x86: Move command-line initrd loading to efi_main Arvind Sankar
2020-04-30 18:28 ` [PATCH v2 09/11] efi/libstub: Unify initrd loading across architectures Arvind Sankar
2020-04-30 18:28 ` [PATCH v2 10/11] efi/x86: Support builtin command line Arvind Sankar
2020-04-30 18:28 ` [PATCH v2 11/11] efi/libstub: Check return value of efi_parse_options Arvind Sankar
2020-04-30 19:12 ` [PATCH 1/2] efi/libstub: efi_info/efi_err message neatening Joe Perches
2020-04-30 19:12 ` [PATCH 2/2] efi/libstub: Correct comment typos Joe Perches
2020-04-30 19:30 ` Ard Biesheuvel
2020-05-04 18:29 ` [trivial PATCH] efi/libstub: Reduce efi_printk object size Joe Perches
2020-05-05 7:50 ` Ard Biesheuvel
2020-05-05 8:01 ` Joe Perches
2020-04-30 19:29 ` [PATCH 1/2] efi/libstub: efi_info/efi_err message neatening Ard Biesheuvel
2020-04-30 19:38 ` Joe Perches
2020-04-30 20:40 ` Arvind Sankar
2020-04-30 20:42 ` Ard Biesheuvel
2020-05-04 8:17 ` [PATCH v2 00/11] efi: some cleanups/refactoring for efi/next Ard Biesheuvel
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=202004300731.4b6aZLP7%lkp@intel.com \
--to=lkp@intel.com \
--cc=ardb@kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nivedita@alum.mit.edu \
--cc=x86@kernel.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.