tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 647060f3b592d3c8df0c85dd887557b03e6ea897 commit: 56e62a73702836017564eaacd5212e4d0fa1c01d [4125/4677] s390: convert to generic entry config: s390-randconfig-r003-20210120 (attached as .config) compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 22b68440e1647e16b5ee24b924986207173c02d1) 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 # install s390 cross compiling tool for clang build # apt-get install binutils-s390x-linux-gnu # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=56e62a73702836017564eaacd5212e4d0fa1c01d git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout 56e62a73702836017564eaacd5212e4d0fa1c01d # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> All warnings (new ones prefixed by >>): #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x)) ^ include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32' ___constant_swab32(x) : \ ^ include/uapi/linux/swab.h:20:12: note: expanded from macro '___constant_swab32' (((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \ ^ In file included from arch/s390/kernel/signal.c:27: In file included from include/linux/tracehook.h:50: In file included from include/linux/memcontrol.h:22: In file included from include/linux/writeback.h:14: In file included from include/linux/blk-cgroup.h:23: In file included from include/linux/blkdev.h:26: In file included from include/linux/scatterlist.h:9: In file included from arch/s390/include/asm/io.h:80: include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu' #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x)) ^ include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32' ___constant_swab32(x) : \ ^ include/uapi/linux/swab.h:21:12: note: expanded from macro '___constant_swab32' (((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \ ^ In file included from arch/s390/kernel/signal.c:27: In file included from include/linux/tracehook.h:50: In file included from include/linux/memcontrol.h:22: In file included from include/linux/writeback.h:14: In file included from include/linux/blk-cgroup.h:23: In file included from include/linux/blkdev.h:26: In file included from include/linux/scatterlist.h:9: In file included from arch/s390/include/asm/io.h:80: include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu' #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x)) ^ include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32' ___constant_swab32(x) : \ ^ include/uapi/linux/swab.h:22:12: note: expanded from macro '___constant_swab32' (((__u32)(x) & (__u32)0xff000000UL) >> 24))) ^ In file included from arch/s390/kernel/signal.c:27: In file included from include/linux/tracehook.h:50: In file included from include/linux/memcontrol.h:22: In file included from include/linux/writeback.h:14: In file included from include/linux/blk-cgroup.h:23: In file included from include/linux/blkdev.h:26: In file included from include/linux/scatterlist.h:9: In file included from arch/s390/include/asm/io.h:80: include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu' #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x)) ^ include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32' __fswab32(x)) ^ In file included from arch/s390/kernel/signal.c:27: In file included from include/linux/tracehook.h:50: In file included from include/linux/memcontrol.h:22: In file included from include/linux/writeback.h:14: In file included from include/linux/blk-cgroup.h:23: In file included from include/linux/blkdev.h:26: In file included from include/linux/scatterlist.h:9: In file included from arch/s390/include/asm/io.h:80: include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writeb(value, PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] readsb(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] readsw(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] readsl(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] writesb(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] writesw(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] writesl(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ >> arch/s390/kernel/signal.c:464:6: warning: no previous prototype for function 'arch_do_signal_or_restart' [-Wmissing-prototypes] void arch_do_signal_or_restart(struct pt_regs *regs, bool has_signal) ^ arch/s390/kernel/signal.c:464:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void arch_do_signal_or_restart(struct pt_regs *regs, bool has_signal) ^ static 21 warnings generated. vim +/arch_do_signal_or_restart +464 arch/s390/kernel/signal.c 453 454 /* 455 * Note that 'init' is a special process: it doesn't get signals it doesn't 456 * want to handle. Thus you cannot kill init even with a SIGKILL even by 457 * mistake. 458 * 459 * Note that we go through the signals twice: once to check the signals that 460 * the kernel can handle, and then we build all the user-level signal handling 461 * stack-frames in one go after that. 462 */ 463 > 464 void arch_do_signal_or_restart(struct pt_regs *regs, bool has_signal) 465 { 466 struct ksignal ksig; 467 sigset_t *oldset = sigmask_to_save(); 468 469 /* 470 * Get signal to deliver. When running under ptrace, at this point 471 * the debugger may change all our registers, including the system 472 * call information. 473 */ 474 current->thread.system_call = 475 test_pt_regs_flag(regs, PIF_SYSCALL) ? regs->int_code : 0; 476 477 if (has_signal && get_signal(&ksig)) { 478 /* Whee! Actually deliver the signal. */ 479 if (current->thread.system_call) { 480 regs->int_code = current->thread.system_call; 481 /* Check for system call restarting. */ 482 switch (regs->gprs[2]) { 483 case -ERESTART_RESTARTBLOCK: 484 case -ERESTARTNOHAND: 485 regs->gprs[2] = -EINTR; 486 break; 487 case -ERESTARTSYS: 488 if (!(ksig.ka.sa.sa_flags & SA_RESTART)) { 489 regs->gprs[2] = -EINTR; 490 break; 491 } 492 fallthrough; 493 case -ERESTARTNOINTR: 494 regs->gprs[2] = regs->orig_gpr2; 495 regs->psw.addr = 496 __rewind_psw(regs->psw, 497 regs->int_code >> 16); 498 break; 499 } 500 } 501 /* No longer in a system call */ 502 clear_pt_regs_flag(regs, PIF_SYSCALL); 503 clear_pt_regs_flag(regs, PIF_SYSCALL_RESTART); 504 rseq_signal_deliver(&ksig, regs); 505 if (is_compat_task()) 506 handle_signal32(&ksig, oldset, regs); 507 else 508 handle_signal(&ksig, oldset, regs); 509 return; 510 } 511 512 /* No handlers present - check for system call restart */ 513 clear_pt_regs_flag(regs, PIF_SYSCALL); 514 clear_pt_regs_flag(regs, PIF_SYSCALL_RESTART); 515 if (current->thread.system_call) { 516 regs->int_code = current->thread.system_call; 517 switch (regs->gprs[2]) { 518 case -ERESTART_RESTARTBLOCK: 519 /* Restart with sys_restart_syscall */ 520 regs->int_code = __NR_restart_syscall; 521 fallthrough; 522 case -ERESTARTNOHAND: 523 case -ERESTARTSYS: 524 case -ERESTARTNOINTR: 525 /* Restart system call with magic TIF bit. */ 526 regs->gprs[2] = regs->orig_gpr2; 527 set_pt_regs_flag(regs, PIF_SYSCALL_RESTART); 528 if (test_thread_flag(TIF_SINGLE_STEP)) 529 clear_thread_flag(TIF_PER_TRAP); 530 break; 531 } 532 } 533 534 /* 535 * If there's no signal to deliver, we just put the saved sigmask back. 536 */ 537 restore_saved_sigmask(); 538 } 539 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip