From: kernel test robot <lkp@intel.com>
To: Jonathan Marek <jonathan@marek.ca>, linux-efi@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, Ard Biesheuvel <ardb@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] efi/libstub: consider CONFIG_CMDLINE for initrd= and dtb= options
Date: Tue, 15 Oct 2024 08:13:27 +0800 [thread overview]
Message-ID: <202410150734.BTqw8f36-lkp@intel.com> (raw)
In-Reply-To: <20241011224812.25763-3-jonathan@marek.ca>
Hi Jonathan,
kernel test robot noticed the following build errors:
[auto build test ERROR on efi/next]
[also build test ERROR on linus/master v6.12-rc3 next-20241014]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Jonathan-Marek/efi-libstub-remove-uneccessary-cmdline_size-init-check/20241012-065337
base: https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git next
patch link: https://lore.kernel.org/r/20241011224812.25763-3-jonathan%40marek.ca
patch subject: [PATCH 3/3] efi/libstub: consider CONFIG_CMDLINE for initrd= and dtb= options
config: x86_64-defconfig (https://download.01.org/0day-ci/archive/20241015/202410150734.BTqw8f36-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241015/202410150734.BTqw8f36-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410150734.BTqw8f36-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/firmware/efi/libstub/file.c: In function 'handle_cmdline_files':
>> drivers/firmware/efi/libstub/file.c:218:38: error: expected ';' before 'CONFIG_CMDLINE'
218 | cmdline = L"" CONFIG_CMDLINE;
| ^~~~~~~~~~~~~~~
| ;
In file included from include/linux/string.h:6,
from include/linux/efi.h:16,
from drivers/firmware/efi/libstub/file.c:10:
>> drivers/firmware/efi/libstub/file.c:219:54: error: expected ')' before 'CONFIG_CMDLINE'
219 | cmdline_len = ARRAY_SIZE(L"" CONFIG_CMDLINE) - 1;
| ^~~~~~~~~~~~~~
include/linux/array_size.h:11:33: note: in definition of macro 'ARRAY_SIZE'
11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
| ^~~
include/linux/array_size.h:11:32: note: to match this '('
11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
| ^
drivers/firmware/efi/libstub/file.c:219:39: note: in expansion of macro 'ARRAY_SIZE'
219 | cmdline_len = ARRAY_SIZE(L"" CONFIG_CMDLINE) - 1;
| ^~~~~~~~~~
>> drivers/firmware/efi/libstub/file.c:219:54: error: expected ')' before 'CONFIG_CMDLINE'
219 | cmdline_len = ARRAY_SIZE(L"" CONFIG_CMDLINE) - 1;
| ^~~~~~~~~~~~~~
include/linux/array_size.h:11:48: note: in definition of macro 'ARRAY_SIZE'
11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
| ^~~
include/linux/array_size.h:11:47: note: to match this '('
11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
| ^
drivers/firmware/efi/libstub/file.c:219:39: note: in expansion of macro 'ARRAY_SIZE'
219 | cmdline_len = ARRAY_SIZE(L"" CONFIG_CMDLINE) - 1;
| ^~~~~~~~~~
In file included from include/linux/init.h:5,
from include/linux/efi.h:15,
from drivers/firmware/efi/libstub/file.c:10:
>> drivers/firmware/efi/libstub/file.c:219:54: error: expected ')' before 'CONFIG_CMDLINE'
219 | cmdline_len = ARRAY_SIZE(L"" CONFIG_CMDLINE) - 1;
| ^~~~~~~~~~~~~~
include/linux/build_bug.h:16:62: note: in definition of macro 'BUILD_BUG_ON_ZERO'
16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
| ^
include/linux/compiler.h:243:51: note: in expansion of macro '__same_type'
243 | #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
| ^~~~~~~~~~~
include/linux/array_size.h:11:59: note: in expansion of macro '__must_be_array'
11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
| ^~~~~~~~~~~~~~~
drivers/firmware/efi/libstub/file.c:219:39: note: in expansion of macro 'ARRAY_SIZE'
219 | cmdline_len = ARRAY_SIZE(L"" CONFIG_CMDLINE) - 1;
| ^~~~~~~~~~
include/linux/compiler.h:243:63: note: to match this '('
243 | #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
| ^
include/linux/build_bug.h:16:62: note: in definition of macro 'BUILD_BUG_ON_ZERO'
16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
| ^
include/linux/compiler.h:243:51: note: in expansion of macro '__same_type'
243 | #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
| ^~~~~~~~~~~
include/linux/array_size.h:11:59: note: in expansion of macro '__must_be_array'
11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
| ^~~~~~~~~~~~~~~
drivers/firmware/efi/libstub/file.c:219:39: note: in expansion of macro 'ARRAY_SIZE'
219 | cmdline_len = ARRAY_SIZE(L"" CONFIG_CMDLINE) - 1;
| ^~~~~~~~~~
>> drivers/firmware/efi/libstub/file.c:219:54: error: expected ')' before 'CONFIG_CMDLINE'
219 | cmdline_len = ARRAY_SIZE(L"" CONFIG_CMDLINE) - 1;
| ^~~~~~~~~~~~~~
include/linux/build_bug.h:16:62: note: in definition of macro 'BUILD_BUG_ON_ZERO'
16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
| ^
include/linux/compiler.h:243:51: note: in expansion of macro '__same_type'
243 | #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
| ^~~~~~~~~~~
include/linux/array_size.h:11:59: note: in expansion of macro '__must_be_array'
11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
| ^~~~~~~~~~~~~~~
drivers/firmware/efi/libstub/file.c:219:39: note: in expansion of macro 'ARRAY_SIZE'
219 | cmdline_len = ARRAY_SIZE(L"" CONFIG_CMDLINE) - 1;
| ^~~~~~~~~~
include/linux/compiler.h:243:69: note: to match this '('
243 | #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
| ^
include/linux/build_bug.h:16:62: note: in definition of macro 'BUILD_BUG_ON_ZERO'
16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
| ^
include/linux/compiler.h:243:51: note: in expansion of macro '__same_type'
243 | #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
| ^~~~~~~~~~~
include/linux/array_size.h:11:59: note: in expansion of macro '__must_be_array'
11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
| ^~~~~~~~~~~~~~~
drivers/firmware/efi/libstub/file.c:219:39: note: in expansion of macro 'ARRAY_SIZE'
219 | cmdline_len = ARRAY_SIZE(L"" CONFIG_CMDLINE) - 1;
| ^~~~~~~~~~
vim +218 drivers/firmware/efi/libstub/file.c
177
178 /*
179 * Check the cmdline for a LILO-style file= arguments.
180 *
181 * We only support loading a file from the same filesystem as
182 * the kernel image.
183 */
184 efi_status_t handle_cmdline_files(efi_loaded_image_t *image,
185 const efi_char16_t *optstr,
186 int optstr_size,
187 unsigned long soft_limit,
188 unsigned long hard_limit,
189 unsigned long *load_addr,
190 unsigned long *load_size)
191 {
192 const efi_char16_t *cmdline = efi_table_attr(image, load_options);
193 u32 cmdline_len = efi_table_attr(image, load_options_size);
194 unsigned long efi_chunk_size = ULONG_MAX;
195 efi_file_protocol_t *volume = NULL;
196 efi_file_protocol_t *file;
197 unsigned long alloc_addr;
198 unsigned long alloc_size;
199 efi_status_t status;
200 int offset;
201
202 if (!load_addr || !load_size)
203 return EFI_INVALID_PARAMETER;
204
205 efi_apply_loadoptions_quirk((const void **)&cmdline, &cmdline_len);
206 cmdline_len /= sizeof(*cmdline);
207
208 if (IS_ENABLED(CONFIG_X86) && !efi_nochunk)
209 efi_chunk_size = EFI_READ_CHUNK_SIZE;
210
211 if (IS_ENABLED(CONFIG_CMDLINE_EXTEND) ||
212 IS_ENABLED(CONFIG_CMDLINE_FORCE) ||
213 cmdline_len == 0) {
214 if (!IS_ENABLED(CONFIG_CMDLINE_FORCE) && cmdline_len > 0) {
215 /* both CONFIG_CMDLINE and load_options should be used */
216 efi_warn("ignoring %ls from CONFIG_CMDLINE\n", optstr);
217 } else {
> 218 cmdline = L"" CONFIG_CMDLINE;
> 219 cmdline_len = ARRAY_SIZE(L"" CONFIG_CMDLINE) - 1;
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-10-15 0:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-11 22:48 [PATCH 1/3] efi/libstub: fix efi_parse_options() ignoring the default command line Jonathan Marek
2024-10-11 22:48 ` [PATCH 2/3] efi/libstub: remove uneccessary cmdline_size init/check Jonathan Marek
2024-10-12 7:49 ` Ard Biesheuvel
2024-10-11 22:48 ` [PATCH 3/3] efi/libstub: consider CONFIG_CMDLINE for initrd= and dtb= options Jonathan Marek
2024-10-12 7:54 ` Ard Biesheuvel
2024-10-12 12:00 ` Jonathan Marek
2024-10-12 13:36 ` Ard Biesheuvel
2024-10-12 14:07 ` Jonathan Marek
2024-10-12 14:50 ` Ard Biesheuvel
2024-10-12 15:00 ` Jonathan Marek
2024-10-15 0:13 ` kernel test robot [this message]
2024-10-15 2:08 ` kernel test robot
2024-10-12 7:46 ` [PATCH 1/3] efi/libstub: fix efi_parse_options() ignoring the default command line Ard Biesheuvel
2024-10-12 11:55 ` Jonathan Marek
2024-10-12 13:15 ` 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=202410150734.BTqw8f36-lkp@intel.com \
--to=lkp@intel.com \
--cc=ardb@kernel.org \
--cc=jonathan@marek.ca \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox