* [efi:next 39/40] drivers/firmware/efi/libstub/efi-stub-helper.c:265 efi_convert_cmdline() warn: qualifier 'l' ignored for %s specifier
@ 2020-05-20 14:09 ` Dan Carpenter
0 siblings, 0 replies; 14+ messages in thread
From: Dan Carpenter @ 2020-05-20 14:09 UTC (permalink / raw)
To: kbuild, Arvind Sankar; +Cc: lkp, kbuild-all, linux-efi, Ard Biesheuvel
[-- Attachment #1: Type: text/plain, Size: 2656 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git next
head: e5fbadd1179cdadeaa44d71a9ec068c5bc100524
commit: 85f5afd4322d294a7eca0d304744a1646113fbd9 [39/40] efi/libstub: Use snprintf with %ls to convert the command line
config: x86_64-defconfig (attached as .config)
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
drivers/firmware/efi/libstub/efi-stub-helper.c:265 efi_convert_cmdline() warn: qualifier 'l' ignored for %s specifier
# https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git/commit/?id=85f5afd4322d294a7eca0d304744a1646113fbd9
git remote add efi https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git
git remote update efi
git checkout 85f5afd4322d294a7eca0d304744a1646113fbd9
vim +/l +265 drivers/firmware/efi/libstub/efi-stub-helper.c
c625d1c203941f drivers/firmware/efi/efi-stub-helper.c H. Peter Anvin 2013-09-20 258 options_bytes++; /* NUL termination */
9403e462fb5ffa drivers/firmware/efi/efi-stub-helper.c Leif Lindholm 2014-04-04 259
1e45bf7372c48c drivers/firmware/efi/libstub/efi-stub-helper.c Ard Biesheuvel 2020-02-10 260 status = efi_allocate_pages(options_bytes, &cmdline_addr, max_addr);
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 261 if (status != EFI_SUCCESS)
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 262 return NULL;
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 263
85f5afd4322d29 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 264 snprintf((char *)cmdline_addr, options_bytes, "%.*ls",
^
The "l" doesn't make sense here?
85f5afd4322d29 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 @265 options_bytes - 1, options);
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 266
c625d1c203941f drivers/firmware/efi/efi-stub-helper.c H. Peter Anvin 2013-09-20 267 *cmd_line_len = options_bytes;
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 268 return (char *)cmdline_addr;
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 269 }
---
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: 29127 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* [efi:next 39/40] drivers/firmware/efi/libstub/efi-stub-helper.c:265 efi_convert_cmdline() warn: qualifier 'l' ignored for %s specifier
@ 2020-05-20 14:09 ` Dan Carpenter
0 siblings, 0 replies; 14+ messages in thread
From: Dan Carpenter @ 2020-05-20 14:09 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 2695 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git next
head: e5fbadd1179cdadeaa44d71a9ec068c5bc100524
commit: 85f5afd4322d294a7eca0d304744a1646113fbd9 [39/40] efi/libstub: Use snprintf with %ls to convert the command line
config: x86_64-defconfig (attached as .config)
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
drivers/firmware/efi/libstub/efi-stub-helper.c:265 efi_convert_cmdline() warn: qualifier 'l' ignored for %s specifier
# https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git/commit/?id=85f5afd4322d294a7eca0d304744a1646113fbd9
git remote add efi https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git
git remote update efi
git checkout 85f5afd4322d294a7eca0d304744a1646113fbd9
vim +/l +265 drivers/firmware/efi/libstub/efi-stub-helper.c
c625d1c203941f drivers/firmware/efi/efi-stub-helper.c H. Peter Anvin 2013-09-20 258 options_bytes++; /* NUL termination */
9403e462fb5ffa drivers/firmware/efi/efi-stub-helper.c Leif Lindholm 2014-04-04 259
1e45bf7372c48c drivers/firmware/efi/libstub/efi-stub-helper.c Ard Biesheuvel 2020-02-10 260 status = efi_allocate_pages(options_bytes, &cmdline_addr, max_addr);
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 261 if (status != EFI_SUCCESS)
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 262 return NULL;
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 263
85f5afd4322d29 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 264 snprintf((char *)cmdline_addr, options_bytes, "%.*ls",
^
The "l" doesn't make sense here?
85f5afd4322d29 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 @265 options_bytes - 1, options);
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 266
c625d1c203941f drivers/firmware/efi/efi-stub-helper.c H. Peter Anvin 2013-09-20 267 *cmd_line_len = options_bytes;
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 268 return (char *)cmdline_addr;
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 269 }
---
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: 29127 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* [efi:next 39/40] drivers/firmware/efi/libstub/efi-stub-helper.c:265 efi_convert_cmdline() warn: qualifier 'l' ignored for %s specifier
@ 2020-05-20 14:09 ` Dan Carpenter
0 siblings, 0 replies; 14+ messages in thread
From: Dan Carpenter @ 2020-05-20 14:09 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2695 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git next
head: e5fbadd1179cdadeaa44d71a9ec068c5bc100524
commit: 85f5afd4322d294a7eca0d304744a1646113fbd9 [39/40] efi/libstub: Use snprintf with %ls to convert the command line
config: x86_64-defconfig (attached as .config)
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
drivers/firmware/efi/libstub/efi-stub-helper.c:265 efi_convert_cmdline() warn: qualifier 'l' ignored for %s specifier
# https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git/commit/?id=85f5afd4322d294a7eca0d304744a1646113fbd9
git remote add efi https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git
git remote update efi
git checkout 85f5afd4322d294a7eca0d304744a1646113fbd9
vim +/l +265 drivers/firmware/efi/libstub/efi-stub-helper.c
c625d1c203941f drivers/firmware/efi/efi-stub-helper.c H. Peter Anvin 2013-09-20 258 options_bytes++; /* NUL termination */
9403e462fb5ffa drivers/firmware/efi/efi-stub-helper.c Leif Lindholm 2014-04-04 259
1e45bf7372c48c drivers/firmware/efi/libstub/efi-stub-helper.c Ard Biesheuvel 2020-02-10 260 status = efi_allocate_pages(options_bytes, &cmdline_addr, max_addr);
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 261 if (status != EFI_SUCCESS)
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 262 return NULL;
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 263
85f5afd4322d29 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 264 snprintf((char *)cmdline_addr, options_bytes, "%.*ls",
^
The "l" doesn't make sense here?
85f5afd4322d29 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 @265 options_bytes - 1, options);
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 266
c625d1c203941f drivers/firmware/efi/efi-stub-helper.c H. Peter Anvin 2013-09-20 267 *cmd_line_len = options_bytes;
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 268 return (char *)cmdline_addr;
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 269 }
---
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: 29127 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [efi:next 39/40] drivers/firmware/efi/libstub/efi-stub-helper.c:265 efi_convert_cmdline() warn: qualifier 'l' ignored for %s specifier
2020-05-20 14:09 ` Dan Carpenter
(?)
(?)
@ 2020-05-20 15:43 ` Arvind Sankar
2020-05-20 17:54 ` Dan Carpenter
-1 siblings, 1 reply; 14+ messages in thread
From: Arvind Sankar @ 2020-05-20 15:43 UTC (permalink / raw)
To: Dan Carpenter
Cc: kbuild, Arvind Sankar, lkp, kbuild-all, linux-efi, Ard Biesheuvel
On Wed, May 20, 2020 at 05:09:03PM +0300, Dan Carpenter wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git next
> head: e5fbadd1179cdadeaa44d71a9ec068c5bc100524
> commit: 85f5afd4322d294a7eca0d304744a1646113fbd9 [39/40] efi/libstub: Use snprintf with %ls to convert the command line
> config: x86_64-defconfig (attached as .config)
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kbuild test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> New smatch warnings:
> drivers/firmware/efi/libstub/efi-stub-helper.c:265 efi_convert_cmdline() warn: qualifier 'l' ignored for %s specifier
>
> # https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git/commit/?id=85f5afd4322d294a7eca0d304744a1646113fbd9
> git remote add efi https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git
> git remote update efi
> git checkout 85f5afd4322d294a7eca0d304744a1646113fbd9
> vim +/l +265 drivers/firmware/efi/libstub/efi-stub-helper.c
>
> c625d1c203941f drivers/firmware/efi/efi-stub-helper.c H. Peter Anvin 2013-09-20 258 options_bytes++; /* NUL termination */
> 9403e462fb5ffa drivers/firmware/efi/efi-stub-helper.c Leif Lindholm 2014-04-04 259
> 1e45bf7372c48c drivers/firmware/efi/libstub/efi-stub-helper.c Ard Biesheuvel 2020-02-10 260 status = efi_allocate_pages(options_bytes, &cmdline_addr, max_addr);
> 5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 261 if (status != EFI_SUCCESS)
> 5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 262 return NULL;
> 5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 263
> 85f5afd4322d29 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 264 snprintf((char *)cmdline_addr, options_bytes, "%.*ls",
> ^
> The "l" doesn't make sense here?
The previous patches add support for wide strings to the version of
snprintf used here.
>
> 85f5afd4322d29 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 @265 options_bytes - 1, options);
> 5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 266
> c625d1c203941f drivers/firmware/efi/efi-stub-helper.c H. Peter Anvin 2013-09-20 267 *cmd_line_len = options_bytes;
> 5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 268 return (char *)cmdline_addr;
> 5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 269 }
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [efi:next 39/40] drivers/firmware/efi/libstub/efi-stub-helper.c:265 efi_convert_cmdline() warn: qualifier 'l' ignored for %s specifier
2020-05-20 15:43 ` Arvind Sankar
2020-05-20 17:54 ` Dan Carpenter
@ 2020-05-20 17:54 ` Dan Carpenter
0 siblings, 0 replies; 14+ messages in thread
From: Dan Carpenter @ 2020-05-20 17:54 UTC (permalink / raw)
To: Arvind Sankar; +Cc: kbuild, lkp, kbuild-all, linux-efi, Ard Biesheuvel
On Wed, May 20, 2020 at 11:43:08AM -0400, Arvind Sankar wrote:
> On Wed, May 20, 2020 at 05:09:03PM +0300, Dan Carpenter wrote:
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git next
> > head: e5fbadd1179cdadeaa44d71a9ec068c5bc100524
> > commit: 85f5afd4322d294a7eca0d304744a1646113fbd9 [39/40] efi/libstub: Use snprintf with %ls to convert the command line
> > config: x86_64-defconfig (attached as .config)
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kbuild test robot <lkp@intel.com>
> > Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> >
> > New smatch warnings:
> > drivers/firmware/efi/libstub/efi-stub-helper.c:265 efi_convert_cmdline() warn: qualifier 'l' ignored for %s specifier
> >
> > # https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git/commit/?id=85f5afd4322d294a7eca0d304744a1646113fbd9
> > git remote add efi https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git
> > git remote update efi
> > git checkout 85f5afd4322d294a7eca0d304744a1646113fbd9
> > vim +/l +265 drivers/firmware/efi/libstub/efi-stub-helper.c
> >
> > c625d1c203941f drivers/firmware/efi/efi-stub-helper.c H. Peter Anvin 2013-09-20 258 options_bytes++; /* NUL termination */
> > 9403e462fb5ffa drivers/firmware/efi/efi-stub-helper.c Leif Lindholm 2014-04-04 259
> > 1e45bf7372c48c drivers/firmware/efi/libstub/efi-stub-helper.c Ard Biesheuvel 2020-02-10 260 status = efi_allocate_pages(options_bytes, &cmdline_addr, max_addr);
> > 5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 261 if (status != EFI_SUCCESS)
> > 5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 262 return NULL;
> > 5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 263
> > 85f5afd4322d29 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 264 snprintf((char *)cmdline_addr, options_bytes, "%.*ls",
> > ^
> > The "l" doesn't make sense here?
>
> The previous patches add support for wide strings to the version of
> snprintf used here.
Ah. Thanks. I will update the Smatch check.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [efi:next 39/40] drivers/firmware/efi/libstub/efi-stub-helper.c:265 efi_convert_cmdline() warn: qualifier 'l' ignored for %s specifier
@ 2020-05-20 17:54 ` Dan Carpenter
0 siblings, 0 replies; 14+ messages in thread
From: Dan Carpenter @ 2020-05-20 17:54 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 2413 bytes --]
On Wed, May 20, 2020 at 11:43:08AM -0400, Arvind Sankar wrote:
> On Wed, May 20, 2020 at 05:09:03PM +0300, Dan Carpenter wrote:
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git next
> > head: e5fbadd1179cdadeaa44d71a9ec068c5bc100524
> > commit: 85f5afd4322d294a7eca0d304744a1646113fbd9 [39/40] efi/libstub: Use snprintf with %ls to convert the command line
> > config: x86_64-defconfig (attached as .config)
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kbuild test robot <lkp@intel.com>
> > Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> >
> > New smatch warnings:
> > drivers/firmware/efi/libstub/efi-stub-helper.c:265 efi_convert_cmdline() warn: qualifier 'l' ignored for %s specifier
> >
> > # https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git/commit/?id=85f5afd4322d294a7eca0d304744a1646113fbd9
> > git remote add efi https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git
> > git remote update efi
> > git checkout 85f5afd4322d294a7eca0d304744a1646113fbd9
> > vim +/l +265 drivers/firmware/efi/libstub/efi-stub-helper.c
> >
> > c625d1c203941f drivers/firmware/efi/efi-stub-helper.c H. Peter Anvin 2013-09-20 258 options_bytes++; /* NUL termination */
> > 9403e462fb5ffa drivers/firmware/efi/efi-stub-helper.c Leif Lindholm 2014-04-04 259
> > 1e45bf7372c48c drivers/firmware/efi/libstub/efi-stub-helper.c Ard Biesheuvel 2020-02-10 260 status = efi_allocate_pages(options_bytes, &cmdline_addr, max_addr);
> > 5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 261 if (status != EFI_SUCCESS)
> > 5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 262 return NULL;
> > 5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 263
> > 85f5afd4322d29 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 264 snprintf((char *)cmdline_addr, options_bytes, "%.*ls",
> > ^
> > The "l" doesn't make sense here?
>
> The previous patches add support for wide strings to the version of
> snprintf used here.
Ah. Thanks. I will update the Smatch check.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [efi:next 39/40] drivers/firmware/efi/libstub/efi-stub-helper.c:265 efi_convert_cmdline() warn: qualifier 'l' ignored for %s specifier
@ 2020-05-20 17:54 ` Dan Carpenter
0 siblings, 0 replies; 14+ messages in thread
From: Dan Carpenter @ 2020-05-20 17:54 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2413 bytes --]
On Wed, May 20, 2020 at 11:43:08AM -0400, Arvind Sankar wrote:
> On Wed, May 20, 2020 at 05:09:03PM +0300, Dan Carpenter wrote:
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git next
> > head: e5fbadd1179cdadeaa44d71a9ec068c5bc100524
> > commit: 85f5afd4322d294a7eca0d304744a1646113fbd9 [39/40] efi/libstub: Use snprintf with %ls to convert the command line
> > config: x86_64-defconfig (attached as .config)
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kbuild test robot <lkp@intel.com>
> > Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> >
> > New smatch warnings:
> > drivers/firmware/efi/libstub/efi-stub-helper.c:265 efi_convert_cmdline() warn: qualifier 'l' ignored for %s specifier
> >
> > # https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git/commit/?id=85f5afd4322d294a7eca0d304744a1646113fbd9
> > git remote add efi https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git
> > git remote update efi
> > git checkout 85f5afd4322d294a7eca0d304744a1646113fbd9
> > vim +/l +265 drivers/firmware/efi/libstub/efi-stub-helper.c
> >
> > c625d1c203941f drivers/firmware/efi/efi-stub-helper.c H. Peter Anvin 2013-09-20 258 options_bytes++; /* NUL termination */
> > 9403e462fb5ffa drivers/firmware/efi/efi-stub-helper.c Leif Lindholm 2014-04-04 259
> > 1e45bf7372c48c drivers/firmware/efi/libstub/efi-stub-helper.c Ard Biesheuvel 2020-02-10 260 status = efi_allocate_pages(options_bytes, &cmdline_addr, max_addr);
> > 5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 261 if (status != EFI_SUCCESS)
> > 5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 262 return NULL;
> > 5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 263
> > 85f5afd4322d29 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 264 snprintf((char *)cmdline_addr, options_bytes, "%.*ls",
> > ^
> > The "l" doesn't make sense here?
>
> The previous patches add support for wide strings to the version of
> snprintf used here.
Ah. Thanks. I will update the Smatch check.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [efi:next 39/40] drivers/firmware/efi/libstub/efi-stub-helper.c:265 efi_convert_cmdline() warn: qualifier 'l' ignored for %s specifier
2020-05-20 17:54 ` Dan Carpenter
(?)
(?)
@ 2020-05-20 18:00 ` Arvind Sankar
2020-05-20 18:00 ` Ard Biesheuvel
2020-05-20 18:20 ` Dan Carpenter
-1 siblings, 2 replies; 14+ messages in thread
From: Arvind Sankar @ 2020-05-20 18:00 UTC (permalink / raw)
To: Dan Carpenter
Cc: Arvind Sankar, kbuild, lkp, kbuild-all, linux-efi, Ard Biesheuvel
On Wed, May 20, 2020 at 08:54:49PM +0300, Dan Carpenter wrote:
> On Wed, May 20, 2020 at 11:43:08AM -0400, Arvind Sankar wrote:
> > On Wed, May 20, 2020 at 05:09:03PM +0300, Dan Carpenter wrote:
> > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git next
> > > head: e5fbadd1179cdadeaa44d71a9ec068c5bc100524
> > > commit: 85f5afd4322d294a7eca0d304744a1646113fbd9 [39/40] efi/libstub: Use snprintf with %ls to convert the command line
> > > config: x86_64-defconfig (attached as .config)
> > >
> > > If you fix the issue, kindly add following tag as appropriate
> > > Reported-by: kbuild test robot <lkp@intel.com>
> > > Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> > >
> > > New smatch warnings:
> > > drivers/firmware/efi/libstub/efi-stub-helper.c:265 efi_convert_cmdline() warn: qualifier 'l' ignored for %s specifier
> > >
> > > # https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git/commit/?id=85f5afd4322d294a7eca0d304744a1646113fbd9
> > > git remote add efi https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git
> > > git remote update efi
> > > git checkout 85f5afd4322d294a7eca0d304744a1646113fbd9
> > > vim +/l +265 drivers/firmware/efi/libstub/efi-stub-helper.c
> > >
> > > c625d1c203941f drivers/firmware/efi/efi-stub-helper.c H. Peter Anvin 2013-09-20 258 options_bytes++; /* NUL termination */
> > > 9403e462fb5ffa drivers/firmware/efi/efi-stub-helper.c Leif Lindholm 2014-04-04 259
> > > 1e45bf7372c48c drivers/firmware/efi/libstub/efi-stub-helper.c Ard Biesheuvel 2020-02-10 260 status = efi_allocate_pages(options_bytes, &cmdline_addr, max_addr);
> > > 5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 261 if (status != EFI_SUCCESS)
> > > 5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 262 return NULL;
> > > 5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 263
> > > 85f5afd4322d29 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 264 snprintf((char *)cmdline_addr, options_bytes, "%.*ls",
> > > ^
> > > The "l" doesn't make sense here?
> >
> > The previous patches add support for wide strings to the version of
> > snprintf used here.
>
> Ah. Thanks. I will update the Smatch check.
>
> regards,
> dan carpenter
>
Note that the main kernel's printf still doesn't support it. It's only
been added to the version in drivers/firmware/efi/libstub/vsprintf.c
(added as part of this series).
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [efi:next 39/40] drivers/firmware/efi/libstub/efi-stub-helper.c:265 efi_convert_cmdline() warn: qualifier 'l' ignored for %s specifier
2020-05-20 18:00 ` Arvind Sankar
@ 2020-05-20 18:00 ` Ard Biesheuvel
2020-05-20 18:20 ` Dan Carpenter
1 sibling, 0 replies; 14+ messages in thread
From: Ard Biesheuvel @ 2020-05-20 18:00 UTC (permalink / raw)
To: Arvind Sankar
Cc: Dan Carpenter, kbuild, kbuild test robot, kbuild-all, linux-efi
On Wed, 20 May 2020 at 20:00, Arvind Sankar <nivedita@alum.mit.edu> wrote:
>
> On Wed, May 20, 2020 at 08:54:49PM +0300, Dan Carpenter wrote:
> > On Wed, May 20, 2020 at 11:43:08AM -0400, Arvind Sankar wrote:
> > > On Wed, May 20, 2020 at 05:09:03PM +0300, Dan Carpenter wrote:
> > > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git next
> > > > head: e5fbadd1179cdadeaa44d71a9ec068c5bc100524
> > > > commit: 85f5afd4322d294a7eca0d304744a1646113fbd9 [39/40] efi/libstub: Use snprintf with %ls to convert the command line
> > > > config: x86_64-defconfig (attached as .config)
> > > >
> > > > If you fix the issue, kindly add following tag as appropriate
> > > > Reported-by: kbuild test robot <lkp@intel.com>
> > > > Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> > > >
> > > > New smatch warnings:
> > > > drivers/firmware/efi/libstub/efi-stub-helper.c:265 efi_convert_cmdline() warn: qualifier 'l' ignored for %s specifier
> > > >
> > > > # https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git/commit/?id=85f5afd4322d294a7eca0d304744a1646113fbd9
> > > > git remote add efi https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git
> > > > git remote update efi
> > > > git checkout 85f5afd4322d294a7eca0d304744a1646113fbd9
> > > > vim +/l +265 drivers/firmware/efi/libstub/efi-stub-helper.c
> > > >
> > > > c625d1c203941f drivers/firmware/efi/efi-stub-helper.c H. Peter Anvin 2013-09-20 258 options_bytes++; /* NUL termination */
> > > > 9403e462fb5ffa drivers/firmware/efi/efi-stub-helper.c Leif Lindholm 2014-04-04 259
> > > > 1e45bf7372c48c drivers/firmware/efi/libstub/efi-stub-helper.c Ard Biesheuvel 2020-02-10 260 status = efi_allocate_pages(options_bytes, &cmdline_addr, max_addr);
> > > > 5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 261 if (status != EFI_SUCCESS)
> > > > 5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 262 return NULL;
> > > > 5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 263
> > > > 85f5afd4322d29 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 264 snprintf((char *)cmdline_addr, options_bytes, "%.*ls",
> > > > ^
> > > > The "l" doesn't make sense here?
> > >
> > > The previous patches add support for wide strings to the version of
> > > snprintf used here.
> >
> > Ah. Thanks. I will update the Smatch check.
> >
> > regards,
> > dan carpenter
> >
> Note that the main kernel's printf still doesn't support it. It's only
> been added to the version in drivers/firmware/efi/libstub/vsprintf.c
> (added as part of this series).
... which is justified, given how heavily EFI depends on UTF-16 support.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [efi:next 39/40] drivers/firmware/efi/libstub/efi-stub-helper.c:265 efi_convert_cmdline() warn: qualifier 'l' ignored for %s specifier
@ 2020-05-20 18:00 ` Ard Biesheuvel
0 siblings, 0 replies; 14+ messages in thread
From: Ard Biesheuvel @ 2020-05-20 18:00 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2984 bytes --]
On Wed, 20 May 2020 at 20:00, Arvind Sankar <nivedita@alum.mit.edu> wrote:
>
> On Wed, May 20, 2020 at 08:54:49PM +0300, Dan Carpenter wrote:
> > On Wed, May 20, 2020 at 11:43:08AM -0400, Arvind Sankar wrote:
> > > On Wed, May 20, 2020 at 05:09:03PM +0300, Dan Carpenter wrote:
> > > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git next
> > > > head: e5fbadd1179cdadeaa44d71a9ec068c5bc100524
> > > > commit: 85f5afd4322d294a7eca0d304744a1646113fbd9 [39/40] efi/libstub: Use snprintf with %ls to convert the command line
> > > > config: x86_64-defconfig (attached as .config)
> > > >
> > > > If you fix the issue, kindly add following tag as appropriate
> > > > Reported-by: kbuild test robot <lkp@intel.com>
> > > > Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> > > >
> > > > New smatch warnings:
> > > > drivers/firmware/efi/libstub/efi-stub-helper.c:265 efi_convert_cmdline() warn: qualifier 'l' ignored for %s specifier
> > > >
> > > > # https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git/commit/?id=85f5afd4322d294a7eca0d304744a1646113fbd9
> > > > git remote add efi https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git
> > > > git remote update efi
> > > > git checkout 85f5afd4322d294a7eca0d304744a1646113fbd9
> > > > vim +/l +265 drivers/firmware/efi/libstub/efi-stub-helper.c
> > > >
> > > > c625d1c203941f drivers/firmware/efi/efi-stub-helper.c H. Peter Anvin 2013-09-20 258 options_bytes++; /* NUL termination */
> > > > 9403e462fb5ffa drivers/firmware/efi/efi-stub-helper.c Leif Lindholm 2014-04-04 259
> > > > 1e45bf7372c48c drivers/firmware/efi/libstub/efi-stub-helper.c Ard Biesheuvel 2020-02-10 260 status = efi_allocate_pages(options_bytes, &cmdline_addr, max_addr);
> > > > 5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 261 if (status != EFI_SUCCESS)
> > > > 5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 262 return NULL;
> > > > 5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 263
> > > > 85f5afd4322d29 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 264 snprintf((char *)cmdline_addr, options_bytes, "%.*ls",
> > > > ^
> > > > The "l" doesn't make sense here?
> > >
> > > The previous patches add support for wide strings to the version of
> > > snprintf used here.
> >
> > Ah. Thanks. I will update the Smatch check.
> >
> > regards,
> > dan carpenter
> >
> Note that the main kernel's printf still doesn't support it. It's only
> been added to the version in drivers/firmware/efi/libstub/vsprintf.c
> (added as part of this series).
... which is justified, given how heavily EFI depends on UTF-16 support.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [efi:next 39/40] drivers/firmware/efi/libstub/efi-stub-helper.c:265 efi_convert_cmdline() warn: qualifier 'l' ignored for %s specifier
2020-05-20 18:00 ` Arvind Sankar
2020-05-20 18:00 ` Ard Biesheuvel
@ 2020-05-20 18:20 ` Dan Carpenter
1 sibling, 0 replies; 14+ messages in thread
From: Dan Carpenter @ 2020-05-20 18:20 UTC (permalink / raw)
To: Arvind Sankar; +Cc: kbuild, lkp, kbuild-all, linux-efi, Ard Biesheuvel
On Wed, May 20, 2020 at 02:00:08PM -0400, Arvind Sankar wrote:
> On Wed, May 20, 2020 at 08:54:49PM +0300, Dan Carpenter wrote:
> > On Wed, May 20, 2020 at 11:43:08AM -0400, Arvind Sankar wrote:
> > > On Wed, May 20, 2020 at 05:09:03PM +0300, Dan Carpenter wrote:
> > > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git next
> > > > head: e5fbadd1179cdadeaa44d71a9ec068c5bc100524
> > > > commit: 85f5afd4322d294a7eca0d304744a1646113fbd9 [39/40] efi/libstub: Use snprintf with %ls to convert the command line
> > > > config: x86_64-defconfig (attached as .config)
> > > >
> > > > If you fix the issue, kindly add following tag as appropriate
> > > > Reported-by: kbuild test robot <lkp@intel.com>
> > > > Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> > > >
> > > > New smatch warnings:
> > > > drivers/firmware/efi/libstub/efi-stub-helper.c:265 efi_convert_cmdline() warn: qualifier 'l' ignored for %s specifier
> > > >
> > > > # https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git/commit/?id=85f5afd4322d294a7eca0d304744a1646113fbd9
> > > > git remote add efi https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git
> > > > git remote update efi
> > > > git checkout 85f5afd4322d294a7eca0d304744a1646113fbd9
> > > > vim +/l +265 drivers/firmware/efi/libstub/efi-stub-helper.c
> > > >
> > > > c625d1c203941f drivers/firmware/efi/efi-stub-helper.c H. Peter Anvin 2013-09-20 258 options_bytes++; /* NUL termination */
> > > > 9403e462fb5ffa drivers/firmware/efi/efi-stub-helper.c Leif Lindholm 2014-04-04 259
> > > > 1e45bf7372c48c drivers/firmware/efi/libstub/efi-stub-helper.c Ard Biesheuvel 2020-02-10 260 status = efi_allocate_pages(options_bytes, &cmdline_addr, max_addr);
> > > > 5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 261 if (status != EFI_SUCCESS)
> > > > 5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 262 return NULL;
> > > > 5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 263
> > > > 85f5afd4322d29 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 264 snprintf((char *)cmdline_addr, options_bytes, "%.*ls",
> > > > ^
> > > > The "l" doesn't make sense here?
> > >
> > > The previous patches add support for wide strings to the version of
> > > snprintf used here.
> >
> > Ah. Thanks. I will update the Smatch check.
> >
> > regards,
> > dan carpenter
> >
> Note that the main kernel's printf still doesn't support it. It's only
> been added to the version in drivers/firmware/efi/libstub/vsprintf.c
> (added as part of this series).
Ah... I looked and looked at lib/vsprintf.c and wondered if I was going
mad. :P Thanks.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [efi:next 39/40] drivers/firmware/efi/libstub/efi-stub-helper.c:265 efi_convert_cmdline() warn: qualifier 'l' ignored for %s specifier
@ 2020-05-20 18:20 ` Dan Carpenter
0 siblings, 0 replies; 14+ messages in thread
From: Dan Carpenter @ 2020-05-20 18:20 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 2996 bytes --]
On Wed, May 20, 2020 at 02:00:08PM -0400, Arvind Sankar wrote:
> On Wed, May 20, 2020 at 08:54:49PM +0300, Dan Carpenter wrote:
> > On Wed, May 20, 2020 at 11:43:08AM -0400, Arvind Sankar wrote:
> > > On Wed, May 20, 2020 at 05:09:03PM +0300, Dan Carpenter wrote:
> > > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git next
> > > > head: e5fbadd1179cdadeaa44d71a9ec068c5bc100524
> > > > commit: 85f5afd4322d294a7eca0d304744a1646113fbd9 [39/40] efi/libstub: Use snprintf with %ls to convert the command line
> > > > config: x86_64-defconfig (attached as .config)
> > > >
> > > > If you fix the issue, kindly add following tag as appropriate
> > > > Reported-by: kbuild test robot <lkp@intel.com>
> > > > Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> > > >
> > > > New smatch warnings:
> > > > drivers/firmware/efi/libstub/efi-stub-helper.c:265 efi_convert_cmdline() warn: qualifier 'l' ignored for %s specifier
> > > >
> > > > # https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git/commit/?id=85f5afd4322d294a7eca0d304744a1646113fbd9
> > > > git remote add efi https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git
> > > > git remote update efi
> > > > git checkout 85f5afd4322d294a7eca0d304744a1646113fbd9
> > > > vim +/l +265 drivers/firmware/efi/libstub/efi-stub-helper.c
> > > >
> > > > c625d1c203941f drivers/firmware/efi/efi-stub-helper.c H. Peter Anvin 2013-09-20 258 options_bytes++; /* NUL termination */
> > > > 9403e462fb5ffa drivers/firmware/efi/efi-stub-helper.c Leif Lindholm 2014-04-04 259
> > > > 1e45bf7372c48c drivers/firmware/efi/libstub/efi-stub-helper.c Ard Biesheuvel 2020-02-10 260 status = efi_allocate_pages(options_bytes, &cmdline_addr, max_addr);
> > > > 5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 261 if (status != EFI_SUCCESS)
> > > > 5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 262 return NULL;
> > > > 5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 263
> > > > 85f5afd4322d29 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 264 snprintf((char *)cmdline_addr, options_bytes, "%.*ls",
> > > > ^
> > > > The "l" doesn't make sense here?
> > >
> > > The previous patches add support for wide strings to the version of
> > > snprintf used here.
> >
> > Ah. Thanks. I will update the Smatch check.
> >
> > regards,
> > dan carpenter
> >
> Note that the main kernel's printf still doesn't support it. It's only
> been added to the version in drivers/firmware/efi/libstub/vsprintf.c
> (added as part of this series).
Ah... I looked and looked at lib/vsprintf.c and wondered if I was going
mad. :P Thanks.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [efi:next 39/40] drivers/firmware/efi/libstub/efi-stub-helper.c:265 efi_convert_cmdline() warn: qualifier 'l' ignored for %s specifier
@ 2020-05-20 18:20 ` Dan Carpenter
0 siblings, 0 replies; 14+ messages in thread
From: Dan Carpenter @ 2020-05-20 18:20 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2996 bytes --]
On Wed, May 20, 2020 at 02:00:08PM -0400, Arvind Sankar wrote:
> On Wed, May 20, 2020 at 08:54:49PM +0300, Dan Carpenter wrote:
> > On Wed, May 20, 2020 at 11:43:08AM -0400, Arvind Sankar wrote:
> > > On Wed, May 20, 2020 at 05:09:03PM +0300, Dan Carpenter wrote:
> > > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git next
> > > > head: e5fbadd1179cdadeaa44d71a9ec068c5bc100524
> > > > commit: 85f5afd4322d294a7eca0d304744a1646113fbd9 [39/40] efi/libstub: Use snprintf with %ls to convert the command line
> > > > config: x86_64-defconfig (attached as .config)
> > > >
> > > > If you fix the issue, kindly add following tag as appropriate
> > > > Reported-by: kbuild test robot <lkp@intel.com>
> > > > Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> > > >
> > > > New smatch warnings:
> > > > drivers/firmware/efi/libstub/efi-stub-helper.c:265 efi_convert_cmdline() warn: qualifier 'l' ignored for %s specifier
> > > >
> > > > # https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git/commit/?id=85f5afd4322d294a7eca0d304744a1646113fbd9
> > > > git remote add efi https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git
> > > > git remote update efi
> > > > git checkout 85f5afd4322d294a7eca0d304744a1646113fbd9
> > > > vim +/l +265 drivers/firmware/efi/libstub/efi-stub-helper.c
> > > >
> > > > c625d1c203941f drivers/firmware/efi/efi-stub-helper.c H. Peter Anvin 2013-09-20 258 options_bytes++; /* NUL termination */
> > > > 9403e462fb5ffa drivers/firmware/efi/efi-stub-helper.c Leif Lindholm 2014-04-04 259
> > > > 1e45bf7372c48c drivers/firmware/efi/libstub/efi-stub-helper.c Ard Biesheuvel 2020-02-10 260 status = efi_allocate_pages(options_bytes, &cmdline_addr, max_addr);
> > > > 5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 261 if (status != EFI_SUCCESS)
> > > > 5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 262 return NULL;
> > > > 5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 263
> > > > 85f5afd4322d29 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 264 snprintf((char *)cmdline_addr, options_bytes, "%.*ls",
> > > > ^
> > > > The "l" doesn't make sense here?
> > >
> > > The previous patches add support for wide strings to the version of
> > > snprintf used here.
> >
> > Ah. Thanks. I will update the Smatch check.
> >
> > regards,
> > dan carpenter
> >
> Note that the main kernel's printf still doesn't support it. It's only
> been added to the version in drivers/firmware/efi/libstub/vsprintf.c
> (added as part of this series).
Ah... I looked and looked at lib/vsprintf.c and wondered if I was going
mad. :P Thanks.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 14+ messages in thread
* [efi:next 39/40] drivers/firmware/efi/libstub/efi-stub-helper.c:265 efi_convert_cmdline() warn: qualifier 'l' ignored for %s specifier
@ 2020-05-19 22:51 kbuild test robot
0 siblings, 0 replies; 14+ messages in thread
From: kbuild test robot @ 2020-05-19 22:51 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 9821 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-efi(a)vger.kernel.org
TO: Arvind Sankar <nivedita@alum.mit.edu>
CC: Ard Biesheuvel <ardb@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git next
head: e5fbadd1179cdadeaa44d71a9ec068c5bc100524
commit: 85f5afd4322d294a7eca0d304744a1646113fbd9 [39/40] efi/libstub: Use snprintf with %ls to convert the command line
config: x86_64-defconfig (attached as .config)
:::::: branch date: 14 hours ago
:::::: commit date: 14 hours ago
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
drivers/firmware/efi/libstub/efi-stub-helper.c:265 efi_convert_cmdline() warn: qualifier 'l' ignored for %s specifier
Old smatch warnings:
drivers/firmware/efi/libstub/efi-stub-helper.c:173 efi_parse_options() error: uninitialized symbol 'buf'.
drivers/firmware/efi/libstub/efi-stub-helper.c:423 efi_load_initrd_dev_path() error: uninitialized symbol 'handle'.
drivers/firmware/efi/libstub/efi-stub-helper.c:423 efi_load_initrd_dev_path() error: uninitialized symbol 'handle'.
drivers/firmware/efi/libstub/efi-stub-helper.c:428 efi_load_initrd_dev_path() error: potentially dereferencing uninitialized 'lf2'.
drivers/firmware/efi/libstub/efi-stub-helper.c:428 efi_load_initrd_dev_path() error: potentially dereferencing uninitialized 'lf2'.
drivers/firmware/efi/libstub/efi-stub-helper.c:506 efi_wait_for_key() error: uninitialized symbol 'timer'.
drivers/firmware/efi/libstub/efi-stub-helper.c:506 efi_wait_for_key() error: uninitialized symbol 'timer'.
# https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git/commit/?id=85f5afd4322d294a7eca0d304744a1646113fbd9
git remote add efi https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git
git remote update efi
git checkout 85f5afd4322d294a7eca0d304744a1646113fbd9
vim +/l +265 drivers/firmware/efi/libstub/efi-stub-helper.c
7721da4c1ebf96 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 207
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 208 /*
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 209 * Convert the unicode UEFI command line to ASCII to pass to kernel.
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 210 * Size of memory allocated return in *cmd_line_len.
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 211 * Returns NULL on error.
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 212 */
cd33a5c1d53e43 drivers/firmware/efi/libstub/efi-stub-helper.c Ard Biesheuvel 2019-12-24 213 char *efi_convert_cmdline(efi_loaded_image_t *image,
1e45bf7372c48c drivers/firmware/efi/libstub/efi-stub-helper.c Ard Biesheuvel 2020-02-10 214 int *cmd_line_len, unsigned long max_addr)
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 215 {
c625d1c203941f drivers/firmware/efi/efi-stub-helper.c H. Peter Anvin 2013-09-20 216 const u16 *s2;
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 217 unsigned long cmdline_addr = 0;
85f5afd4322d29 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 218 int options_chars = efi_table_attr(image, load_options_size) / 2;
f7b85b33eb0b30 drivers/firmware/efi/libstub/efi-stub-helper.c Ard Biesheuvel 2020-02-14 219 const u16 *options = efi_table_attr(image, load_options);
c625d1c203941f drivers/firmware/efi/efi-stub-helper.c H. Peter Anvin 2013-09-20 220 int options_bytes = 0; /* UTF-8 bytes */
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 221 efi_status_t status;
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 222
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 223 if (options) {
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 224 s2 = options;
85f5afd4322d29 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 225 while (options_chars--) {
74a7b47e636144 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 226 u16 c = *s2++;
74a7b47e636144 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 227
74a7b47e636144 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 228 if (c == L'\0' || c == L'\n')
74a7b47e636144 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 229 break;
74a7b47e636144 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 230 /*
74a7b47e636144 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 231 * Get the number of UTF-8 bytes corresponding to a
74a7b47e636144 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 232 * UTF-16 character.
74a7b47e636144 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 233 * The first part handles everything in the BMP.
74a7b47e636144 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 234 */
74a7b47e636144 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 235 options_bytes += 1 + (c >= 0x80) + (c >= 0x800);
74a7b47e636144 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 236 /*
74a7b47e636144 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 237 * Add one more byte for valid surrogate pairs. Invalid
74a7b47e636144 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 238 * surrogates will be replaced with 0xfffd and take up
74a7b47e636144 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 239 * only 3 bytes.
74a7b47e636144 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 240 */
74a7b47e636144 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 241 if ((c & 0xfc00) == 0xd800) {
74a7b47e636144 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 242 /*
74a7b47e636144 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 243 * If the very last word is a high surrogate,
74a7b47e636144 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 244 * we must ignore it since we can't access the
74a7b47e636144 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 245 * low surrogate.
74a7b47e636144 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 246 */
85f5afd4322d29 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 247 if (!options_chars) {
74a7b47e636144 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 248 options_bytes -= 3;
74a7b47e636144 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 249 } else if ((*s2 & 0xfc00) == 0xdc00) {
74a7b47e636144 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 250 options_bytes++;
85f5afd4322d29 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 251 options_chars--;
74a7b47e636144 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 252 s2++;
74a7b47e636144 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 253 }
74a7b47e636144 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 254 }
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 255 }
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 256 }
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 257
c625d1c203941f drivers/firmware/efi/efi-stub-helper.c H. Peter Anvin 2013-09-20 258 options_bytes++; /* NUL termination */
9403e462fb5ffa drivers/firmware/efi/efi-stub-helper.c Leif Lindholm 2014-04-04 259
1e45bf7372c48c drivers/firmware/efi/libstub/efi-stub-helper.c Ard Biesheuvel 2020-02-10 260 status = efi_allocate_pages(options_bytes, &cmdline_addr, max_addr);
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 261 if (status != EFI_SUCCESS)
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 262 return NULL;
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 263
85f5afd4322d29 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 264 snprintf((char *)cmdline_addr, options_bytes, "%.*ls",
85f5afd4322d29 drivers/firmware/efi/libstub/efi-stub-helper.c Arvind Sankar 2020-05-18 @265 options_bytes - 1, options);
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 266
c625d1c203941f drivers/firmware/efi/efi-stub-helper.c H. Peter Anvin 2013-09-20 267 *cmd_line_len = options_bytes;
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 268 return (char *)cmdline_addr;
5fef3870c572a3 drivers/firmware/efi/efi-stub-helper.c Roy Franz 2013-09-22 269 }
fc07716ba80348 drivers/firmware/efi/libstub/efi-stub-helper.c Jeffrey Hugo 2016-08-29 270
---
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: 29127 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2020-05-20 18:20 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-20 14:09 [efi:next 39/40] drivers/firmware/efi/libstub/efi-stub-helper.c:265 efi_convert_cmdline() warn: qualifier 'l' ignored for %s specifier Dan Carpenter
2020-05-20 14:09 ` Dan Carpenter
2020-05-20 14:09 ` Dan Carpenter
2020-05-20 15:43 ` Arvind Sankar
2020-05-20 17:54 ` Dan Carpenter
2020-05-20 17:54 ` Dan Carpenter
2020-05-20 17:54 ` Dan Carpenter
2020-05-20 18:00 ` Arvind Sankar
2020-05-20 18:00 ` Ard Biesheuvel
2020-05-20 18:00 ` Ard Biesheuvel
2020-05-20 18:20 ` Dan Carpenter
2020-05-20 18:20 ` Dan Carpenter
2020-05-20 18:20 ` Dan Carpenter
-- strict thread matches above, loose matches on Subject: below --
2020-05-19 22:51 kbuild test robot
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.