LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Marco Elver <elver@google.com>
Cc: kbuild-all@01.org, aryabinin@virtuozzo.com, dvyukov@google.com,
	glider@google.com, andreyknvl@google.com,
	akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, kasan-dev@googlegroups.com,
	Marco Elver <elver@google.com>
Subject: Re: [PATCH] mm/kasan: Print frame description for stack bugs
Date: Sun, 19 May 2019 04:48:21 +0800	[thread overview]
Message-ID: <201905190408.ieVAcUi7%lkp@intel.com> (raw)
In-Reply-To: <20190517131046.164100-1-elver@google.com>

[-- Attachment #1: Type: text/plain, Size: 8371 bytes --]

Hi Marco,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.1 next-20190517]
[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/Marco-Elver/mm-kasan-Print-frame-description-for-stack-bugs/20190519-040214
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 8.1.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=8.1.0 make.cross ARCH=xtensa 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from include/linux/printk.h:7,
                    from include/linux/kernel.h:15,
                    from include/linux/kallsyms.h:10,
                    from include/linux/ftrace.h:11,
                    from mm/kasan/report.c:18:
   mm/kasan/report.c: In function 'print_decoded_frame_descr':
>> include/linux/kern_levels.h:5:18: warning: format '%zu' expects argument of type 'size_t', but argument 2 has type 'long unsigned int' [-Wformat=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */
                     ^~~~~~
   include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH'
    #define KERN_ERR KERN_SOH "3" /* error conditions */
                     ^~~~~~~~
   include/linux/printk.h:304:9: note: in expansion of macro 'KERN_ERR'
     printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
            ^~~~~~~~
   mm/kasan/report.c:233:2: note: in expansion of macro 'pr_err'
     pr_err("this frame has %zu %s:\n", num_objects,
     ^~~~~~
   mm/kasan/report.c:233:27: note: format string is defined here
     pr_err("this frame has %zu %s:\n", num_objects,
                            ~~^
                            %lu
   In file included from include/linux/printk.h:7,
                    from include/linux/kernel.h:15,
                    from include/linux/kallsyms.h:10,
                    from include/linux/ftrace.h:11,
                    from mm/kasan/report.c:18:
>> include/linux/kern_levels.h:5:18: warning: format '%zu' expects argument of type 'size_t', but argument 2 has type 'long unsigned int' [-Wformat=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */
                     ^~~~~~
   include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH'
    #define KERN_ERR KERN_SOH "3" /* error conditions */
                     ^~~~~~~~
   include/linux/printk.h:304:9: note: in expansion of macro 'KERN_ERR'
     printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
            ^~~~~~~~
   mm/kasan/report.c:260:3: note: in expansion of macro 'pr_err'
      pr_err(" [%zu, %zu) '%s'", offset, offset + size, token);
      ^~~~~~
   mm/kasan/report.c:260:15: note: format string is defined here
      pr_err(" [%zu, %zu) '%s'", offset, offset + size, token);
                ~~^
                %lu
   In file included from include/linux/printk.h:7,
                    from include/linux/kernel.h:15,
                    from include/linux/kallsyms.h:10,
                    from include/linux/ftrace.h:11,
                    from mm/kasan/report.c:18:
   include/linux/kern_levels.h:5:18: warning: format '%zu' expects argument of type 'size_t', but argument 3 has type 'long unsigned int' [-Wformat=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */
                     ^~~~~~
   include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH'
    #define KERN_ERR KERN_SOH "3" /* error conditions */
                     ^~~~~~~~
   include/linux/printk.h:304:9: note: in expansion of macro 'KERN_ERR'
     printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
            ^~~~~~~~
   mm/kasan/report.c:260:3: note: in expansion of macro 'pr_err'
      pr_err(" [%zu, %zu) '%s'", offset, offset + size, token);
      ^~~~~~
   mm/kasan/report.c:260:20: note: format string is defined here
      pr_err(" [%zu, %zu) '%s'", offset, offset + size, token);
                     ~~^
                     %lu
--
   In file included from include/linux/printk.h:7,
                    from include/linux/kernel.h:15,
                    from include/linux/kallsyms.h:10,
                    from include/linux/ftrace.h:11,
                    from mm//kasan/report.c:18:
   mm//kasan/report.c: In function 'print_decoded_frame_descr':
>> include/linux/kern_levels.h:5:18: warning: format '%zu' expects argument of type 'size_t', but argument 2 has type 'long unsigned int' [-Wformat=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */
                     ^~~~~~
   include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH'
    #define KERN_ERR KERN_SOH "3" /* error conditions */
                     ^~~~~~~~
   include/linux/printk.h:304:9: note: in expansion of macro 'KERN_ERR'
     printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
            ^~~~~~~~
   mm//kasan/report.c:233:2: note: in expansion of macro 'pr_err'
     pr_err("this frame has %zu %s:\n", num_objects,
     ^~~~~~
   mm//kasan/report.c:233:27: note: format string is defined here
     pr_err("this frame has %zu %s:\n", num_objects,
                            ~~^
                            %lu
   In file included from include/linux/printk.h:7,
                    from include/linux/kernel.h:15,
                    from include/linux/kallsyms.h:10,
                    from include/linux/ftrace.h:11,
                    from mm//kasan/report.c:18:
>> include/linux/kern_levels.h:5:18: warning: format '%zu' expects argument of type 'size_t', but argument 2 has type 'long unsigned int' [-Wformat=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */
                     ^~~~~~
   include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH'
    #define KERN_ERR KERN_SOH "3" /* error conditions */
                     ^~~~~~~~
   include/linux/printk.h:304:9: note: in expansion of macro 'KERN_ERR'
     printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
            ^~~~~~~~
   mm//kasan/report.c:260:3: note: in expansion of macro 'pr_err'
      pr_err(" [%zu, %zu) '%s'", offset, offset + size, token);
      ^~~~~~
   mm//kasan/report.c:260:15: note: format string is defined here
      pr_err(" [%zu, %zu) '%s'", offset, offset + size, token);
                ~~^
                %lu
   In file included from include/linux/printk.h:7,
                    from include/linux/kernel.h:15,
                    from include/linux/kallsyms.h:10,
                    from include/linux/ftrace.h:11,
                    from mm//kasan/report.c:18:
   include/linux/kern_levels.h:5:18: warning: format '%zu' expects argument of type 'size_t', but argument 3 has type 'long unsigned int' [-Wformat=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */
                     ^~~~~~
   include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH'
    #define KERN_ERR KERN_SOH "3" /* error conditions */
                     ^~~~~~~~
   include/linux/printk.h:304:9: note: in expansion of macro 'KERN_ERR'
     printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
            ^~~~~~~~
   mm//kasan/report.c:260:3: note: in expansion of macro 'pr_err'
      pr_err(" [%zu, %zu) '%s'", offset, offset + size, token);
      ^~~~~~
   mm//kasan/report.c:260:20: note: format string is defined here
      pr_err(" [%zu, %zu) '%s'", offset, offset + size, token);
                     ~~^
                     %lu

vim +5 include/linux/kern_levels.h

314ba352 Joe Perches 2012-07-30  4  
04d2c8c8 Joe Perches 2012-07-30 @5  #define KERN_SOH	"\001"		/* ASCII Start Of Header */
04d2c8c8 Joe Perches 2012-07-30  6  #define KERN_SOH_ASCII	'\001'
04d2c8c8 Joe Perches 2012-07-30  7  

:::::: The code at line 5 was first introduced by commit
:::::: 04d2c8c83d0e3ac5f78aeede51babb3236200112 printk: convert the format for KERN_<LEVEL> to a 2 byte pattern

:::::: TO: Joe Perches <joe@perches.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

---
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: 57531 bytes --]

  reply	other threads:[~2019-05-18 20:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-17 13:10 Marco Elver
2019-05-18 20:48 ` kbuild test robot [this message]
2019-05-22  2:10   ` Andrew Morton
2019-05-22 10:02     ` Marco Elver
2019-05-23  9:50 ` kbuild test robot

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=201905190408.ieVAcUi7%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=andreyknvl@google.com \
    --cc=aryabinin@virtuozzo.com \
    --cc=dvyukov@google.com \
    --cc=elver@google.com \
    --cc=glider@google.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --subject='Re: [PATCH] mm/kasan: Print frame description for stack bugs' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).