linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v4] printk: Userspace format enumeration support
       [not found] <YCafCKg2bAlOw08H@chrisdown.name>
@ 2021-02-12 18:01 ` kernel test robot
  2021-02-13 14:29   ` Chris Down
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2021-02-12 18:01 UTC (permalink / raw)
  To: Chris Down, linux-kernel
  Cc: kbuild-all, Petr Mladek, Sergey Senozhatsky, John Ogness,
	Johannes Weiner, Andrew Morton, Linux Memory Management List,
	Steven Rostedt, Greg Kroah-Hartman, Kees Cook

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

Hi Chris,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on jeyu/modules-next]
[also build test ERROR on linux/master soc/for-next openrisc/for-next powerpc/next uml/linux-next asm-generic/master linus/master v5.11-rc7 next-20210211]
[cannot apply to tip/x86/core pmladek/for-next]
[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]

url:    https://github.com/0day-ci/linux/commits/Chris-Down/printk-Userspace-format-enumeration-support/20210212-233240
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux.git modules-next
config: ia64-randconfig-r016-20210209 (attached as .config)
compiler: ia64-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
        # https://github.com/0day-ci/linux/commit/bff4c8b4b0b9bcc31917d3b0f1a01a7573a1f473
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Chris-Down/printk-Userspace-format-enumeration-support/20210212-233240
        git checkout bff4c8b4b0b9bcc31917d3b0f1a01a7573a1f473
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64 

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

All errors (new ones prefixed by >>):

   In file included from include/linux/kernel.h:16,
                    from include/asm-generic/bug.h:20,
                    from arch/ia64/include/asm/bug.h:17,
                    from include/linux/bug.h:5,
                    from include/linux/page-flags.h:10,
                    from kernel/bounds.c:10:
>> include/linux/printk.h:219:5: error: static declaration of '_printk' follows non-static declaration
     219 | int _printk(const char *s, ...)
         |     ^~~~~~~
   In file included from arch/ia64/include/uapi/asm/intrinsics.h:22,
                    from arch/ia64/include/asm/intrinsics.h:11,
                    from arch/ia64/include/asm/bitops.h:19,
                    from include/linux/bitops.h:32,
                    from include/linux/kernel.h:11,
                    from include/asm-generic/bug.h:20,
                    from arch/ia64/include/asm/bug.h:17,
                    from include/linux/bug.h:5,
                    from include/linux/page-flags.h:10,
                    from kernel/bounds.c:10:
   arch/ia64/include/uapi/asm/cmpxchg.h:142:14: note: previous declaration of '_printk' was here
     142 |   extern int _printk(const char *fmt, ...);  \
         |              ^~~~~~~
   arch/ia64/include/asm/bitops.h:309:3: note: in expansion of macro 'CMPXCHG_BUGCHECK'
     309 |   CMPXCHG_BUGCHECK(m);
         |   ^~~~~~~~~~~~~~~~
--
   In file included from include/linux/kernel.h:16,
                    from include/asm-generic/bug.h:20,
                    from arch/ia64/include/asm/bug.h:17,
                    from include/linux/bug.h:5,
                    from include/linux/page-flags.h:10,
                    from kernel/bounds.c:10:
>> include/linux/printk.h:219:5: error: static declaration of '_printk' follows non-static declaration
     219 | int _printk(const char *s, ...)
         |     ^~~~~~~
   In file included from arch/ia64/include/uapi/asm/intrinsics.h:22,
                    from arch/ia64/include/asm/intrinsics.h:11,
                    from arch/ia64/include/asm/bitops.h:19,
                    from include/linux/bitops.h:32,
                    from include/linux/kernel.h:11,
                    from include/asm-generic/bug.h:20,
                    from arch/ia64/include/asm/bug.h:17,
                    from include/linux/bug.h:5,
                    from include/linux/page-flags.h:10,
                    from kernel/bounds.c:10:
   arch/ia64/include/uapi/asm/cmpxchg.h:142:14: note: previous declaration of '_printk' was here
     142 |   extern int _printk(const char *fmt, ...);  \
         |              ^~~~~~~
   arch/ia64/include/asm/bitops.h:309:3: note: in expansion of macro 'CMPXCHG_BUGCHECK'
     309 |   CMPXCHG_BUGCHECK(m);
         |   ^~~~~~~~~~~~~~~~
   make[2]: *** [scripts/Makefile.build:117: kernel/bounds.s] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [Makefile:1206: prepare0] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:185: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.


vim +/_printk +219 include/linux/printk.h

   201	
   202	char *log_buf_addr_get(void);
   203	u32 log_buf_len_get(void);
   204	void log_buf_vmcoreinfo_setup(void);
   205	void __init setup_log_buf(int early);
   206	__printf(1, 2) void dump_stack_set_arch_desc(const char *fmt, ...);
   207	void dump_stack_print_info(const char *log_lvl);
   208	void show_regs_print_info(const char *log_lvl);
   209	extern asmlinkage void dump_stack(void) __cold;
   210	extern void printk_safe_flush(void);
   211	extern void printk_safe_flush_on_panic(void);
   212	#else
   213	static inline __printf(1, 0)
   214	int vprintk(const char *s, va_list args)
   215	{
   216		return 0;
   217	}
   218	static inline __printf(1, 2) __cold
 > 219	int _printk(const char *s, ...)
   220	{
   221		return 0;
   222	}
   223	static inline __printf(1, 2) __cold
   224	int _printk_deferred(const char *s, ...)
   225	{
   226		return 0;
   227	}
   228	static inline int printk_ratelimit(void)
   229	{
   230		return 0;
   231	}
   232	static inline bool printk_timed_ratelimit(unsigned long *caller_jiffies,
   233						  unsigned int interval_msec)
   234	{
   235		return false;
   236	}
   237	

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v4] printk: Userspace format enumeration support
  2021-02-12 18:01 ` [PATCH v4] printk: Userspace format enumeration support kernel test robot
@ 2021-02-13 14:29   ` Chris Down
  2021-02-13 15:15     ` Chris Down
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Down @ 2021-02-13 14:29 UTC (permalink / raw)
  To: kernel test robot
  Cc: linux-kernel, kbuild-all, Petr Mladek, Sergey Senozhatsky,
	John Ogness, Johannes Weiner, Andrew Morton,
	Linux Memory Management List, Steven Rostedt, Greg Kroah-Hartman,
	Kees Cook

kernel test robot writes:
>Hi Chris,
>
>Thank you for the patch! Yet something to improve:

I'm pretty sure !CONFIG_PRINTK && CONFIG_IA64_DEBUG_CMPXCHG has been broken 
like this long before this change.

With !CONFIG_PRINTK, printk() is static in the header, but ia64's cmpxchg.h 
with CONFIG_IA64_DEBUG_CMPXCHG doesn't take this into account before trying to 
use it as extern.

CONFIG_IA64_DEBUG_CMPXCHG should be dependent on CONFIG_PRINTK. I'll send a 
separate patch for that, no reason to put it in this series. Not sure why LKP 
only caught it now though.

Here's how it is even on the parent commit LKP applied this patch to:

     % git checkout bff4c8b4b0b9bcc31917d3b0f1a01a7573a1f473^
     Previous HEAD position was bff4c8b4b0b9 printk: Userspace format enumeration support
     HEAD is now at 1fa67f8391ac module: mark TRIM_UNUSED_KSYMS as BROKEN on powerpc
     % COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 /tmp/make.cross ARCH=ia64 -s
     Compiler will be installed in /home/cdown/0day
     make W=1 CROSS_COMPILE=/home/cdown/0day/gcc-9.3.0-nolibc/ia64-linux/bin/ia64-linux- --jobs=32 ARCH=ia64 -s
     In file included from ./include/linux/kernel.h:16,
                      from ./include/asm-generic/bug.h:20,
                      from ./arch/ia64/include/asm/bug.h:17,
                      from ./include/linux/bug.h:5,
                      from ./include/linux/page-flags.h:10,
                      from kernel/bounds.c:10:
     ./include/linux/printk.h:219:5: error: static declaration of 'printk' follows non-static declaration
       219 | int printk(const char *s, ...)
           |     ^~~~~~
     In file included from ./arch/ia64/include/uapi/asm/intrinsics.h:22,
                      from ./arch/ia64/include/asm/intrinsics.h:11,
                      from ./arch/ia64/include/asm/bitops.h:19,
                      from ./include/linux/bitops.h:32,
                      from ./include/linux/kernel.h:11,
                      from ./include/asm-generic/bug.h:20,
                      from ./arch/ia64/include/asm/bug.h:17,
                      from ./include/linux/bug.h:5,
                      from ./include/linux/page-flags.h:10,
                      from kernel/bounds.c:10:
     ./arch/ia64/include/uapi/asm/cmpxchg.h:142:14: note: previous declaration of 'printk' was here
       142 |   extern int printk(const char *fmt, ...);  \
           |              ^~~~~~
     ./arch/ia64/include/asm/bitops.h:309:3: note: in expansion of macro 'CMPXCHG_BUGCHECK'
       309 |   CMPXCHG_BUGCHECK(m);
           |   ^~~~~~~~~~~~~~~~
     make[1]: *** [scripts/Makefile.build:117: kernel/bounds.s] Error 1
     make[1]: *** Waiting for unfinished jobs....
     make: *** [Makefile:1206: prepare0] Error 2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v4] printk: Userspace format enumeration support
  2021-02-13 14:29   ` Chris Down
@ 2021-02-13 15:15     ` Chris Down
  0 siblings, 0 replies; 3+ messages in thread
From: Chris Down @ 2021-02-13 15:15 UTC (permalink / raw)
  To: kernel test robot
  Cc: linux-kernel, kbuild-all, Petr Mladek, Sergey Senozhatsky,
	John Ogness, Johannes Weiner, Andrew Morton,
	Linux Memory Management List, Steven Rostedt, Greg Kroah-Hartman,
	Kees Cook

Chris Down writes:
>kernel test robot writes:
>>Hi Chris,
>>
>>Thank you for the patch! Yet something to improve:
>
>I'm pretty sure !CONFIG_PRINTK && CONFIG_IA64_DEBUG_CMPXCHG has been 
>broken like this long before this change.

I sent "ia64: Depend on non-static printk for cmpxchg debug"[0] to ia64 folks.  
It shouldn't block this patch, this is already broken.

0: https://lore.kernel.org/patchwork/patch/1380380/


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-02-13 15:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <YCafCKg2bAlOw08H@chrisdown.name>
2021-02-12 18:01 ` [PATCH v4] printk: Userspace format enumeration support kernel test robot
2021-02-13 14:29   ` Chris Down
2021-02-13 15:15     ` Chris Down

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox