* [PATCH] initify_plugin: one more warning workaround
@ 2017-03-29 21:14 Arnd Bergmann
2017-03-31 10:33 ` kbuild test robot
0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2017-03-29 21:14 UTC (permalink / raw)
To: Emese Revfy, Kees Cook
Cc: Arnd Bergmann, Andrew Morton, Andy Shevchenko, Matt Fleming,
linux-kernel
lib/vsprintf.c: In function 'bstr_printf':
lib/vsprintf.c:2409:5: error: 'bstr_printf' captures its 3 ('fmt') parameter, please remove it from the nocapture attribute. [-Werror]
int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf)
Cc: Kees Cook <keescook@chromium.org>
Cc: Emese Revfy <re.emese@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
lib/vsprintf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 21dbdf05dfdf..8e4725341e93 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -2406,7 +2406,7 @@ EXPORT_SYMBOL_GPL(vbin_printf);
* return is greater than or equal to @size, the resulting
* string is truncated.
*/
-int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf)
+__unverified_nocapture(3) int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf)
{
struct printf_spec spec = {0};
char *str, *end;
--
2.9.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] initify_plugin: one more warning workaround
2017-03-29 21:14 [PATCH] initify_plugin: one more warning workaround Arnd Bergmann
@ 2017-03-31 10:33 ` kbuild test robot
2017-03-31 11:20 ` Arnd Bergmann
0 siblings, 1 reply; 4+ messages in thread
From: kbuild test robot @ 2017-03-31 10:33 UTC (permalink / raw)
To: Arnd Bergmann
Cc: kbuild-all, Emese Revfy, Kees Cook, Arnd Bergmann, Andrew Morton,
Andy Shevchenko, Matt Fleming, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 3838 bytes --]
Hi Arnd,
[auto build test WARNING on linus/master]
[also build test WARNING on v4.11-rc4 next-20170330]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Arnd-Bergmann/initify_plugin-one-more-warning-workaround/20170331-161135
reproduce: make htmldocs
All warnings (new ones prefixed by >>):
>> lib/vsprintf.c:2407: warning: No description found for parameter '3'
>> lib/vsprintf.c:2407: warning: Excess function parameter 'buf' description in '__unverified_nocapture'
>> lib/vsprintf.c:2407: warning: Excess function parameter 'size' description in '__unverified_nocapture'
>> lib/vsprintf.c:2407: warning: Excess function parameter 'fmt' description in '__unverified_nocapture'
>> lib/vsprintf.c:2407: warning: Excess function parameter 'bin_buf' description in '__unverified_nocapture'
lib/crc32.c:148: warning: No description found for parameter 'tab)[256]'
lib/crc32.c:148: warning: Excess function parameter 'tab' description in 'crc32_le_generic'
lib/crc32.c:293: warning: No description found for parameter 'tab)[256]'
lib/crc32.c:293: warning: Excess function parameter 'tab' description in 'crc32_be_generic'
lib/crc32.c:1: warning: no structured comments found
vim +/3 +2407 lib/vsprintf.c
4370aa4a Lai Jiangshan 2009-03-06 2391 * This function like C99 vsnprintf, but the difference is that vsnprintf gets
4370aa4a Lai Jiangshan 2009-03-06 2392 * arguments from stack, and bstr_printf gets arguments from @bin_buf which is
4370aa4a Lai Jiangshan 2009-03-06 2393 * a binary buffer that generated by vbin_printf.
4370aa4a Lai Jiangshan 2009-03-06 2394 *
4370aa4a Lai Jiangshan 2009-03-06 2395 * The format follows C99 vsnprintf, but has some extensions:
0efb4d20 Steven Rostedt 2009-09-17 2396 * see vsnprintf comment for details.
4370aa4a Lai Jiangshan 2009-03-06 2397 *
4370aa4a Lai Jiangshan 2009-03-06 2398 * The return value is the number of characters which would
4370aa4a Lai Jiangshan 2009-03-06 2399 * be generated for the given input, excluding the trailing
4370aa4a Lai Jiangshan 2009-03-06 2400 * '\0', as per ISO C99. If you want to have the exact
4370aa4a Lai Jiangshan 2009-03-06 2401 * number of characters written into @buf as return value
4370aa4a Lai Jiangshan 2009-03-06 2402 * (not including the trailing '\0'), use vscnprintf(). If the
4370aa4a Lai Jiangshan 2009-03-06 2403 * return is greater than or equal to @size, the resulting
4370aa4a Lai Jiangshan 2009-03-06 2404 * string is truncated.
4370aa4a Lai Jiangshan 2009-03-06 2405 */
85dcce6c Arnd Bergmann 2017-03-29 2406 __unverified_nocapture(3) int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf)
4370aa4a Lai Jiangshan 2009-03-06 @2407 {
fef20d9c Frederic Weisbecker 2009-03-06 2408 struct printf_spec spec = {0};
d4be151b André Goddard Rosa 2009-12-14 2409 char *str, *end;
d4be151b André Goddard Rosa 2009-12-14 2410 const char *args = (const char *)bin_buf;
4370aa4a Lai Jiangshan 2009-03-06 2411
762abb51 Rasmus Villemoes 2015-11-06 2412 if (WARN_ON_ONCE(size > INT_MAX))
4370aa4a Lai Jiangshan 2009-03-06 2413 return 0;
4370aa4a Lai Jiangshan 2009-03-06 2414
4370aa4a Lai Jiangshan 2009-03-06 2415 str = buf;
:::::: The code at line 2407 was first introduced by commit
:::::: 4370aa4aa75391a5e2e06bccb0919109f725ed8e vsprintf: add binary printf
:::::: TO: Lai Jiangshan <laijs@cn.fujitsu.com>
:::::: CC: Ingo Molnar <mingo@elte.hu>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 6576 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] initify_plugin: one more warning workaround
2017-03-31 10:33 ` kbuild test robot
@ 2017-03-31 11:20 ` Arnd Bergmann
2017-03-31 11:29 ` [kbuild-all] " Fengguang Wu
0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2017-03-31 11:20 UTC (permalink / raw)
To: kbuild test robot
Cc: kbuild-all, Emese Revfy, Kees Cook, Andrew Morton,
Andy Shevchenko, Matt Fleming, Linux Kernel Mailing List
On Fri, Mar 31, 2017 at 12:33 PM, kbuild test robot <lkp@intel.com> wrote:
> Hi Arnd,
>
> [auto build test WARNING on linus/master]
> [also build test WARNING on v4.11-rc4 next-20170330]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
I expected it to work on next but not on linus/master
> url: https://github.com/0day-ci/linux/commits/Arnd-Bergmann/initify_plugin-one-more-warning-workaround/20170331-161135
> reproduce: make htmldocs
>
> All warnings (new ones prefixed by >>):
>
>>> lib/vsprintf.c:2407: warning: No description found for parameter '3'
>>> lib/vsprintf.c:2407: warning: Excess function parameter 'buf' description in '__unverified_nocapture'
>>> lib/vsprintf.c:2407: warning: Excess function parameter 'size' description in '__unverified_nocapture'
>>> lib/vsprintf.c:2407: warning: Excess function parameter 'fmt' description in '__unverified_nocapture'
>>> lib/vsprintf.c:2407: warning: Excess function parameter 'bin_buf' description in '__unverified_nocapture'
These warnings will definitely show up on mainline today.
> lib/crc32.c:148: warning: No description found for parameter 'tab)[256]'
> lib/crc32.c:148: warning: Excess function parameter 'tab' description in 'crc32_le_generic'
> lib/crc32.c:293: warning: No description found for parameter 'tab)[256]'
> lib/crc32.c:293: warning: Excess function parameter 'tab' description in 'crc32_be_generic'
> lib/crc32.c:1: warning: no structured comments found
I don't see how this output relates to my patch.
Did only the latter appear on linux-next?
Arnd
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [kbuild-all] [PATCH] initify_plugin: one more warning workaround
2017-03-31 11:20 ` Arnd Bergmann
@ 2017-03-31 11:29 ` Fengguang Wu
0 siblings, 0 replies; 4+ messages in thread
From: Fengguang Wu @ 2017-03-31 11:29 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Kees Cook, Matt Fleming, Linux Kernel Mailing List, Emese Revfy,
kbuild-all, Andrew Morton, Andy Shevchenko
On Fri, Mar 31, 2017 at 01:20:04PM +0200, Arnd Bergmann wrote:
>On Fri, Mar 31, 2017 at 12:33 PM, kbuild test robot <lkp@intel.com> wrote:
>> Hi Arnd,
>>
>> [auto build test WARNING on linus/master]
>> [also build test WARNING on v4.11-rc4 next-20170330]
>> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>
>I expected it to work on next but not on linus/master
>
>> url: https://github.com/0day-ci/linux/commits/Arnd-Bergmann/initify_plugin-one-more-warning-workaround/20170331-161135
>> reproduce: make htmldocs
>>
>> All warnings (new ones prefixed by >>):
>>
>>>> lib/vsprintf.c:2407: warning: No description found for parameter '3'
>>>> lib/vsprintf.c:2407: warning: Excess function parameter 'buf' description in '__unverified_nocapture'
>>>> lib/vsprintf.c:2407: warning: Excess function parameter 'size' description in '__unverified_nocapture'
>>>> lib/vsprintf.c:2407: warning: Excess function parameter 'fmt' description in '__unverified_nocapture'
>>>> lib/vsprintf.c:2407: warning: Excess function parameter 'bin_buf' description in '__unverified_nocapture'
>
>These warnings will definitely show up on mainline today.
>
>> lib/crc32.c:148: warning: No description found for parameter 'tab)[256]'
>> lib/crc32.c:148: warning: Excess function parameter 'tab' description in 'crc32_le_generic'
>> lib/crc32.c:293: warning: No description found for parameter 'tab)[256]'
>> lib/crc32.c:293: warning: Excess function parameter 'tab' description in 'crc32_be_generic'
>> lib/crc32.c:1: warning: no structured comments found
>
>I don't see how this output relates to my patch.
They are old warnings (not prefixed by >>), so not related to your patch.
>Did only the latter appear on linux-next?
Since your patch is firstly applied to mainline kernel,
the error messages should correspond to mainline kernel.
Regards,
Fengguang
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-03-31 11:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-29 21:14 [PATCH] initify_plugin: one more warning workaround Arnd Bergmann
2017-03-31 10:33 ` kbuild test robot
2017-03-31 11:20 ` Arnd Bergmann
2017-03-31 11:29 ` [kbuild-all] " Fengguang Wu
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.