Re: [PATCH] kernel/trace: Add TRACING_ALLOW_PRINTK config option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Nicolas,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linux/master]
[also build test ERROR on tip/perf/core kees/for-next/pstore linus/master v5.8-rc2 next-20200624]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use  as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Nicolas-Boichat/kernel-trace-Add-TRACING_ALLOW_PRINTK-config-option/20200624-164815
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 5e857ce6eae7ca21b2055cca4885545e29228fe2
config: microblaze-randconfig-r026-20200624 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        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
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=microblaze 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All error/warnings (new ones prefixed by >>):

   In file included from include/linux/bits.h:23,
                    from include/linux/bitops.h:5,
                    from include/linux/kernel.h:12,
                    from include/asm-generic/bug.h:19,
                    from ./arch/microblaze/include/generated/asm/bug.h:1,
                    from include/linux/bug.h:5,
                    from include/linux/mmdebug.h:5,
                    from include/linux/mm.h:9,
                    from include/linux/ring_buffer.h:5,
                    from kernel/trace/ring_buffer_benchmark.c:7:
   kernel/trace/ring_buffer_benchmark.c: In function 'ring_buffer_producer':
>> include/linux/build_bug.h:78:41: error: static assertion failed: "trace_printk called, please enable CONFIG_TRACING_ALLOW_PRINTK."
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                         ^~~~~~~~~~~~~~
>> include/linux/kernel.h:725:2: note: in expansion of macro '__static_assert'
     725 |  __static_assert(    \
         |  ^~~~~~~~~~~~~~~
>> kernel/trace/ring_buffer_benchmark.c:245:2: note: in expansion of macro 'trace_printk'
     245 |  trace_printk("Starting ring buffer hammer\n");
         |  ^~~~~~~~~~~~
>> include/linux/build_bug.h:78:41: error: static assertion failed: "trace_printk called, please enable CONFIG_TRACING_ALLOW_PRINTK."
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                         ^~~~~~~~~~~~~~
>> include/linux/kernel.h:725:2: note: in expansion of macro '__static_assert'
     725 |  __static_assert(    \
         |  ^~~~~~~~~~~~~~~
   kernel/trace/ring_buffer_benchmark.c:284:2: note: in expansion of macro 'trace_printk'
     284 |  trace_printk("End ring buffer hammer\n");
         |  ^~~~~~~~~~~~
>> include/linux/build_bug.h:78:41: error: static assertion failed: "trace_printk called, please enable CONFIG_TRACING_ALLOW_PRINTK."
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                         ^~~~~~~~~~~~~~
>> include/linux/kernel.h:725:2: note: in expansion of macro '__static_assert'
     725 |  __static_assert(    \
         |  ^~~~~~~~~~~~~~~
   kernel/trace/ring_buffer_benchmark.c:303:3: note: in expansion of macro 'trace_printk'
     303 |   trace_printk("ERROR!\n");
         |   ^~~~~~~~~~~~
>> include/linux/build_bug.h:78:41: error: static assertion failed: "trace_printk called, please enable CONFIG_TRACING_ALLOW_PRINTK."
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                         ^~~~~~~~~~~~~~
>> include/linux/kernel.h:725:2: note: in expansion of macro '__static_assert'
     725 |  __static_assert(    \
         |  ^~~~~~~~~~~~~~~
   kernel/trace/ring_buffer_benchmark.c:307:4: note: in expansion of macro 'trace_printk'
     307 |    trace_printk("Running Consumer at nice: %d\n",
         |    ^~~~~~~~~~~~
>> include/linux/build_bug.h:78:41: error: static assertion failed: "trace_printk called, please enable CONFIG_TRACING_ALLOW_PRINTK."
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                         ^~~~~~~~~~~~~~
>> include/linux/kernel.h:725:2: note: in expansion of macro '__static_assert'
     725 |  __static_assert(    \
         |  ^~~~~~~~~~~~~~~
   kernel/trace/ring_buffer_benchmark.c:310:4: note: in expansion of macro 'trace_printk'
     310 |    trace_printk("Running Consumer at SCHED_FIFO %d\n",
         |    ^~~~~~~~~~~~
>> include/linux/build_bug.h:78:41: error: static assertion failed: "trace_printk called, please enable CONFIG_TRACING_ALLOW_PRINTK."
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                         ^~~~~~~~~~~~~~
>> include/linux/kernel.h:725:2: note: in expansion of macro '__static_assert'
     725 |  __static_assert(    \
         |  ^~~~~~~~~~~~~~~
   kernel/trace/ring_buffer_benchmark.c:314:3: note: in expansion of macro 'trace_printk'
     314 |   trace_printk("Running Producer at nice: %d\n",
         |   ^~~~~~~~~~~~
>> include/linux/build_bug.h:78:41: error: static assertion failed: "trace_printk called, please enable CONFIG_TRACING_ALLOW_PRINTK."
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                         ^~~~~~~~~~~~~~
>> include/linux/kernel.h:725:2: note: in expansion of macro '__static_assert'
     725 |  __static_assert(    \
         |  ^~~~~~~~~~~~~~~
   kernel/trace/ring_buffer_benchmark.c:317:3: note: in expansion of macro 'trace_printk'
     317 |   trace_printk("Running Producer at SCHED_FIFO %d\n",
         |   ^~~~~~~~~~~~
>> include/linux/build_bug.h:78:41: error: static assertion failed: "trace_printk called, please enable CONFIG_TRACING_ALLOW_PRINTK."
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                         ^~~~~~~~~~~~~~
>> include/linux/kernel.h:725:2: note: in expansion of macro '__static_assert'
     725 |  __static_assert(    \
         |  ^~~~~~~~~~~~~~~
   kernel/trace/ring_buffer_benchmark.c:323:3: note: in expansion of macro 'trace_printk'
     323 |   trace_printk("WARNING!!! This test is running at lowest priority.\n");
         |   ^~~~~~~~~~~~
>> include/linux/build_bug.h:78:41: error: static assertion failed: "trace_printk called, please enable CONFIG_TRACING_ALLOW_PRINTK."
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                         ^~~~~~~~~~~~~~
>> include/linux/kernel.h:725:2: note: in expansion of macro '__static_assert'
     725 |  __static_assert(    \
         |  ^~~~~~~~~~~~~~~
   kernel/trace/ring_buffer_benchmark.c:325:2: note: in expansion of macro 'trace_printk'
     325 |  trace_printk("Time:     %lld (usecs)\n", time);
         |  ^~~~~~~~~~~~
>> include/linux/build_bug.h:78:41: error: static assertion failed: "trace_printk called, please enable CONFIG_TRACING_ALLOW_PRINTK."
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                         ^~~~~~~~~~~~~~
   include/linux/kernel.h:725:2: note: in expansion of macro '__static_assert'
     725 |  __static_assert(    \
         |  ^~~~~~~~~~~~~~~
   kernel/trace/ring_buffer_benchmark.c:326:2: note: in expansion of macro 'trace_printk'
     326 |  trace_printk("Overruns: %lld\n", overruns);
         |  ^~~~~~~~~~~~
   include/linux/build_bug.h:78:41: error: static assertion failed: "trace_printk called, please enable CONFIG_TRACING_ALLOW_PRINTK."
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                         ^~~~~~~~~~~~~~
   include/linux/kernel.h:725:2: note: in expansion of macro '__static_assert'
     725 |  __static_assert(    \
         |  ^~~~~~~~~~~~~~~
   kernel/trace/ring_buffer_benchmark.c:328:3: note: in expansion of macro 'trace_printk'
     328 |   trace_printk("Read:     (reader disabled)\n");
         |   ^~~~~~~~~~~~
   include/linux/build_bug.h:78:41: error: static assertion failed: "trace_printk called, please enable CONFIG_TRACING_ALLOW_PRINTK."
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                         ^~~~~~~~~~~~~~
   include/linux/kernel.h:725:2: note: in expansion of macro '__static_assert'
     725 |  __static_assert(    \
         |  ^~~~~~~~~~~~~~~
   kernel/trace/ring_buffer_benchmark.c:330:3: note: in expansion of macro 'trace_printk'
     330 |   trace_printk("Read:     %ld  (by %s)\n", read,
         |   ^~~~~~~~~~~~
   include/linux/build_bug.h:78:41: error: static assertion failed: "trace_printk called, please enable CONFIG_TRACING_ALLOW_PRINTK."
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                         ^~~~~~~~~~~~~~
   include/linux/kernel.h:725:2: note: in expansion of macro '__static_assert'
     725 |  __static_assert(    \
         |  ^~~~~~~~~~~~~~~
   kernel/trace/ring_buffer_benchmark.c:332:2: note: in expansion of macro 'trace_printk'
     332 |  trace_printk("Entries:  %lld\n", entries);
         |  ^~~~~~~~~~~~
   include/linux/build_bug.h:78:41: error: static assertion failed: "trace_printk called, please enable CONFIG_TRACING_ALLOW_PRINTK."
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                         ^~~~~~~~~~~~~~
   include/linux/kernel.h:725:2: note: in expansion of macro '__static_assert'
     725 |  __static_assert(    \
         |  ^~~~~~~~~~~~~~~
   kernel/trace/ring_buffer_benchmark.c:333:2: note: in expansion of macro 'trace_printk'
     333 |  trace_printk("Total:    %lld\n", entries + overruns + read);
         |  ^~~~~~~~~~~~
   include/linux/build_bug.h:78:41: error: static assertion failed: "trace_printk called, please enable CONFIG_TRACING_ALLOW_PRINTK."
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                         ^~~~~~~~~~~~~~
   include/linux/kernel.h:725:2: note: in expansion of macro '__static_assert'
     725 |  __static_assert(    \
         |  ^~~~~~~~~~~~~~~
   kernel/trace/ring_buffer_benchmark.c:334:2: note: in expansion of macro 'trace_printk'
     334 |  trace_printk("Missed:   %ld\n", missed);
         |  ^~~~~~~~~~~~
   include/linux/build_bug.h:78:41: error: static assertion failed: "trace_printk called, please enable CONFIG_TRACING_ALLOW_PRINTK."
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                         ^~~~~~~~~~~~~~
   include/linux/kernel.h:725:2: note: in expansion of macro '__static_assert'
     725 |  __static_assert(    \
         |  ^~~~~~~~~~~~~~~
   kernel/trace/ring_buffer_benchmark.c:335:2: note: in expansion of macro 'trace_printk'
     335 |  trace_printk("Hit:      %ld\n", hit);
         |  ^~~~~~~~~~~~
   include/linux/build_bug.h:78:41: error: static assertion failed: "trace_printk called, please enable CONFIG_TRACING_ALLOW_PRINTK."
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                         ^~~~~~~~~~~~~~
   include/linux/kernel.h:725:2: note: in expansion of macro '__static_assert'
     725 |  __static_assert(    \
         |  ^~~~~~~~~~~~~~~
   kernel/trace/ring_buffer_benchmark.c:342:3: note: in expansion of macro 'trace_printk'
     342 |   trace_printk("TIME IS ZERO??\n");
         |   ^~~~~~~~~~~~
   include/linux/build_bug.h:78:41: error: static assertion failed: "trace_printk called, please enable CONFIG_TRACING_ALLOW_PRINTK."
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                         ^~~~~~~~~~~~~~
   include/linux/kernel.h:725:2: note: in expansion of macro '__static_assert'
     725 |  __static_assert(    \
         |  ^~~~~~~~~~~~~~~
   kernel/trace/ring_buffer_benchmark.c:344:2: note: in expansion of macro 'trace_printk'
     344 |  trace_printk("Entries per millisec: %ld\n", hit);
         |  ^~~~~~~~~~~~
   include/linux/build_bug.h:78:41: error: static assertion failed: "trace_printk called, please enable CONFIG_TRACING_ALLOW_PRINTK."
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                         ^~~~~~~~~~~~~~
   include/linux/kernel.h:725:2: note: in expansion of macro '__static_assert'
     725 |  __static_assert(    \
         |  ^~~~~~~~~~~~~~~
   kernel/trace/ring_buffer_benchmark.c:349:3: note: in expansion of macro 'trace_printk'
     349 |   trace_printk("%ld ns per entry\n", avg);
         |   ^~~~~~~~~~~~
   include/linux/build_bug.h:78:41: error: static assertion failed: "trace_printk called, please enable CONFIG_TRACING_ALLOW_PRINTK."
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                         ^~~~~~~~~~~~~~
   include/linux/kernel.h:725:2: note: in expansion of macro '__static_assert'
     725 |  __static_assert(    \
         |  ^~~~~~~~~~~~~~~
   kernel/trace/ring_buffer_benchmark.c:356:3: note: in expansion of macro 'trace_printk'
     356 |   trace_printk("Total iterations per millisec: %ld\n",
         |   ^~~~~~~~~~~~
   include/linux/build_bug.h:78:41: error: static assertion failed: "trace_printk called, please enable CONFIG_TRACING_ALLOW_PRINTK."
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)

vim +78 include/linux/build_bug.h

bc6245e5efd70c Ian Abbott       2017-07-10  60  
6bab69c65013be Rasmus Villemoes 2019-03-07  61  /**
6bab69c65013be Rasmus Villemoes 2019-03-07  62   * static_assert - check integer constant expression at build time
6bab69c65013be Rasmus Villemoes 2019-03-07  63   *
6bab69c65013be Rasmus Villemoes 2019-03-07  64   * static_assert() is a wrapper for the C11 _Static_assert, with a
6bab69c65013be Rasmus Villemoes 2019-03-07  65   * little macro magic to make the message optional (defaulting to the
6bab69c65013be Rasmus Villemoes 2019-03-07  66   * stringification of the tested expression).
6bab69c65013be Rasmus Villemoes 2019-03-07  67   *
6bab69c65013be Rasmus Villemoes 2019-03-07  68   * Contrary to BUILD_BUG_ON(), static_assert() can be used at global
6bab69c65013be Rasmus Villemoes 2019-03-07  69   * scope, but requires the expression to be an integer constant
6bab69c65013be Rasmus Villemoes 2019-03-07  70   * expression (i.e., it is not enough that __builtin_constant_p() is
6bab69c65013be Rasmus Villemoes 2019-03-07  71   * true for expr).
6bab69c65013be Rasmus Villemoes 2019-03-07  72   *
6bab69c65013be Rasmus Villemoes 2019-03-07  73   * Also note that BUILD_BUG_ON() fails the build if the condition is
6bab69c65013be Rasmus Villemoes 2019-03-07  74   * true, while static_assert() fails the build if the expression is
6bab69c65013be Rasmus Villemoes 2019-03-07  75   * false.
6bab69c65013be Rasmus Villemoes 2019-03-07  76   */
6bab69c65013be Rasmus Villemoes 2019-03-07  77  #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
6bab69c65013be Rasmus Villemoes 2019-03-07 @78  #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
6bab69c65013be Rasmus Villemoes 2019-03-07  79  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux