All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH] kcov: add __no_sanitize_coverage to fix noinstr for all architectures
Date: Wed, 26 May 2021 06:22:59 +0800	[thread overview]
Message-ID: <202105260629.X6n5yc4D-lkp@intel.com> (raw)
In-Reply-To: <20210525175819.699786-1-elver@google.com>

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

Hi Marco,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linux/master]
[also build test WARNING on kees/for-next/pstore linus/master v5.13-rc3 next-20210525]
[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/Marco-Elver/kcov-add-__no_sanitize_coverage-to-fix-noinstr-for-all-architectures/20210526-020046
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git dd860052c99b1e088352bdd4fb7aef46f8d2ef47
config: s390-randconfig-r002-20210525 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 99155e913e9bad5f7f8a247f8bb3a3ff3da74af1)
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://github.com/0day-ci/linux/commit/d898fa12bc72a46da1b9466bb7f8369949b714a9
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Marco-Elver/kcov-add-__no_sanitize_coverage-to-fix-noinstr-for-all-architectures/20210526-020046
        git checkout d898fa12bc72a46da1b9466bb7f8369949b714a9
        # 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@intel.com>

All warnings (new ones prefixed by >>):

   include/uapi/linux/byteorder/big_endian.h:36:59: note: expanded from macro '__le16_to_cpu'
   #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
                                                             ^
   include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
   #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
                                                        ^
   In file included from arch/s390/kernel/traps.c:29:
   In file included from include/linux/entry-common.h:6:
   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:25:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/s390/include/asm/io.h:75:
   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:115:54: note: expanded from macro '__swab32'
   #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
                                                        ^
   In file included from arch/s390/kernel/traps.c:29:
   In file included from include/linux/entry-common.h:6:
   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:25:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/s390/include/asm/io.h:75:
   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);
                   ~~~~~~~~~~ ^
   In file included from arch/s390/kernel/traps.c:29:
   include/linux/entry-common.h:450:18: warning: unknown sanitizer 'coverage' ignored [-Wunknown-sanitizers]
   irqentry_state_t noinstr irqentry_enter(struct pt_regs *regs);
                    ^
   include/linux/compiler_types.h:213:35: note: expanded from macro 'noinstr'
           __no_kcsan __no_sanitize_address __no_sanitize_coverage
                                            ^
   include/linux/compiler-clang.h:49:59: note: expanded from macro '__no_sanitize_coverage'
   #define __no_sanitize_coverage __attribute__((no_sanitize("coverage")))
                                                             ^
   In file included from arch/s390/kernel/traps.c:29:
   include/linux/entry-common.h:476:6: warning: unknown sanitizer 'coverage' ignored [-Wunknown-sanitizers]
   void noinstr irqentry_exit(struct pt_regs *regs, irqentry_state_t state);
        ^
   include/linux/compiler_types.h:213:35: note: expanded from macro 'noinstr'
           __no_kcsan __no_sanitize_address __no_sanitize_coverage
                                            ^
   include/linux/compiler-clang.h:49:59: note: expanded from macro '__no_sanitize_coverage'
   #define __no_sanitize_coverage __attribute__((no_sanitize("coverage")))
                                                             ^
   In file included from arch/s390/kernel/traps.c:29:
   include/linux/entry-common.h:484:18: warning: unknown sanitizer 'coverage' ignored [-Wunknown-sanitizers]
   irqentry_state_t noinstr irqentry_nmi_enter(struct pt_regs *regs);
                    ^
   include/linux/compiler_types.h:213:35: note: expanded from macro 'noinstr'
           __no_kcsan __no_sanitize_address __no_sanitize_coverage
                                            ^
   include/linux/compiler-clang.h:49:59: note: expanded from macro '__no_sanitize_coverage'
   #define __no_sanitize_coverage __attribute__((no_sanitize("coverage")))
                                                             ^
   In file included from arch/s390/kernel/traps.c:29:
   include/linux/entry-common.h:495:6: warning: unknown sanitizer 'coverage' ignored [-Wunknown-sanitizers]
   void noinstr irqentry_nmi_exit(struct pt_regs *regs, irqentry_state_t irq_state);
        ^
   include/linux/compiler_types.h:213:35: note: expanded from macro 'noinstr'
           __no_kcsan __no_sanitize_address __no_sanitize_coverage
                                            ^
   include/linux/compiler-clang.h:49:59: note: expanded from macro '__no_sanitize_coverage'
   #define __no_sanitize_coverage __attribute__((no_sanitize("coverage")))
                                                             ^
>> arch/s390/kernel/traps.c:299:6: warning: unknown sanitizer 'coverage' ignored [-Wunknown-sanitizers]
   void noinstr __do_pgm_check(struct pt_regs *regs)
        ^
   include/linux/compiler_types.h:213:35: note: expanded from macro 'noinstr'
           __no_kcsan __no_sanitize_address __no_sanitize_coverage
                                            ^
   include/linux/compiler-clang.h:49:59: note: expanded from macro '__no_sanitize_coverage'
   #define __no_sanitize_coverage __attribute__((no_sanitize("coverage")))
                                                             ^
   17 warnings generated.
--
   include/uapi/linux/byteorder/big_endian.h:36:59: note: expanded from macro '__le16_to_cpu'
   #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
                                                             ^
   include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
   #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
                                                        ^
   In file included from arch/s390/kernel/syscall.c:34:
   In file included from include/linux/entry-common.h:6:
   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:25:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/s390/include/asm/io.h:75:
   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:115:54: note: expanded from macro '__swab32'
   #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
                                                        ^
   In file included from arch/s390/kernel/syscall.c:34:
   In file included from include/linux/entry-common.h:6:
   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:25:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/s390/include/asm/io.h:75:
   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);
                   ~~~~~~~~~~ ^
   In file included from arch/s390/kernel/syscall.c:34:
   include/linux/entry-common.h:450:18: warning: unknown sanitizer 'coverage' ignored [-Wunknown-sanitizers]
   irqentry_state_t noinstr irqentry_enter(struct pt_regs *regs);
                    ^
   include/linux/compiler_types.h:213:35: note: expanded from macro 'noinstr'
           __no_kcsan __no_sanitize_address __no_sanitize_coverage
                                            ^
   include/linux/compiler-clang.h:49:59: note: expanded from macro '__no_sanitize_coverage'
   #define __no_sanitize_coverage __attribute__((no_sanitize("coverage")))
                                                             ^
   In file included from arch/s390/kernel/syscall.c:34:
   include/linux/entry-common.h:476:6: warning: unknown sanitizer 'coverage' ignored [-Wunknown-sanitizers]
   void noinstr irqentry_exit(struct pt_regs *regs, irqentry_state_t state);
        ^
   include/linux/compiler_types.h:213:35: note: expanded from macro 'noinstr'
           __no_kcsan __no_sanitize_address __no_sanitize_coverage
                                            ^
   include/linux/compiler-clang.h:49:59: note: expanded from macro '__no_sanitize_coverage'
   #define __no_sanitize_coverage __attribute__((no_sanitize("coverage")))
                                                             ^
   In file included from arch/s390/kernel/syscall.c:34:
   include/linux/entry-common.h:484:18: warning: unknown sanitizer 'coverage' ignored [-Wunknown-sanitizers]
   irqentry_state_t noinstr irqentry_nmi_enter(struct pt_regs *regs);
                    ^
   include/linux/compiler_types.h:213:35: note: expanded from macro 'noinstr'
           __no_kcsan __no_sanitize_address __no_sanitize_coverage
                                            ^
   include/linux/compiler-clang.h:49:59: note: expanded from macro '__no_sanitize_coverage'
   #define __no_sanitize_coverage __attribute__((no_sanitize("coverage")))
                                                             ^
   In file included from arch/s390/kernel/syscall.c:34:
   include/linux/entry-common.h:495:6: warning: unknown sanitizer 'coverage' ignored [-Wunknown-sanitizers]
   void noinstr irqentry_nmi_exit(struct pt_regs *regs, irqentry_state_t irq_state);
        ^
   include/linux/compiler_types.h:213:35: note: expanded from macro 'noinstr'
           __no_kcsan __no_sanitize_address __no_sanitize_coverage
                                            ^
   include/linux/compiler-clang.h:49:59: note: expanded from macro '__no_sanitize_coverage'
   #define __no_sanitize_coverage __attribute__((no_sanitize("coverage")))
                                                             ^
>> arch/s390/kernel/syscall.c:143:6: warning: unknown sanitizer 'coverage' ignored [-Wunknown-sanitizers]
   void noinstr __do_syscall(struct pt_regs *regs, int per_trap)
        ^
   include/linux/compiler_types.h:213:35: note: expanded from macro 'noinstr'
           __no_kcsan __no_sanitize_address __no_sanitize_coverage
                                            ^
   include/linux/compiler-clang.h:49:59: note: expanded from macro '__no_sanitize_coverage'
   #define __no_sanitize_coverage __attribute__((no_sanitize("coverage")))
                                                             ^
   17 warnings generated.
--
   In file included from arch/s390/kernel/nmi.c:33:
   In file included from include/linux/kvm_host.h:33:
   In file included from include/linux/kvm_para.h:5:
   In file included from include/uapi/linux/kvm_para.h:36:
   In file included from arch/s390/include/asm/kvm_para.h:25:
   In file included from arch/s390/include/asm/diag.h:12:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/s390/include/asm/io.h:75:
   include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __raw_readb(PCI_IOBASE + addr);
                             ~~~~~~~~~~ ^
   include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/big_endian.h:36:59: note: expanded from macro '__le16_to_cpu'
   #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
                                                             ^
   include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
   #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
                                                        ^
   In file included from arch/s390/kernel/nmi.c:33:
   In file included from include/linux/kvm_host.h:33:
   In file included from include/linux/kvm_para.h:5:
   In file included from include/uapi/linux/kvm_para.h:36:
   In file included from arch/s390/include/asm/kvm_para.h:25:
   In file included from arch/s390/include/asm/diag.h:12:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/s390/include/asm/io.h:75:
   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:115:54: note: expanded from macro '__swab32'
   #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
                                                        ^
   In file included from arch/s390/kernel/nmi.c:33:
   In file included from include/linux/kvm_host.h:33:
   In file included from include/linux/kvm_para.h:5:
   In file included from include/uapi/linux/kvm_para.h:36:
   In file included from arch/s390/include/asm/kvm_para.h:25:
   In file included from arch/s390/include/asm/diag.h:12:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/s390/include/asm/io.h:75:
   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/nmi.c:182:6: warning: unknown sanitizer 'coverage' ignored [-Wunknown-sanitizers]
   void noinstr s390_handle_mcck(void)
        ^
   include/linux/compiler_types.h:213:35: note: expanded from macro 'noinstr'
           __no_kcsan __no_sanitize_address __no_sanitize_coverage
                                            ^
   include/linux/compiler-clang.h:49:59: note: expanded from macro '__no_sanitize_coverage'
   #define __no_sanitize_coverage __attribute__((no_sanitize("coverage")))
                                                             ^
   13 warnings generated.
..


vim +/coverage +299 arch/s390/kernel/traps.c

6f8daa2953ecd1 Heiko Carstens 2021-04-07  298  
56e62a73702836 Sven Schnelle  2020-11-21 @299  void noinstr __do_pgm_check(struct pt_regs *regs)
56e62a73702836 Sven Schnelle  2020-11-21  300  {
56e62a73702836 Sven Schnelle  2020-11-21  301  	unsigned long last_break = S390_lowcore.breaking_event_addr;
56e62a73702836 Sven Schnelle  2020-11-21  302  	unsigned int trapnr, syscall_redirect = 0;
56e62a73702836 Sven Schnelle  2020-11-21  303  	irqentry_state_t state;
56e62a73702836 Sven Schnelle  2020-11-21  304  
bae1cd368c45d1 Sven Schnelle  2021-04-29  305  	add_random_kstack_offset();
56e62a73702836 Sven Schnelle  2020-11-21  306  	regs->int_code = *(u32 *)&S390_lowcore.pgm_ilc;
56e62a73702836 Sven Schnelle  2020-11-21  307  	regs->int_parm_long = S390_lowcore.trans_exc_code;
56e62a73702836 Sven Schnelle  2020-11-21  308  
56e62a73702836 Sven Schnelle  2020-11-21  309  	state = irqentry_enter(regs);
56e62a73702836 Sven Schnelle  2020-11-21  310  
56e62a73702836 Sven Schnelle  2020-11-21  311  	if (user_mode(regs)) {
56e62a73702836 Sven Schnelle  2020-11-21  312  		update_timer_sys();
56e62a73702836 Sven Schnelle  2020-11-21  313  		if (last_break < 4096)
56e62a73702836 Sven Schnelle  2020-11-21  314  			last_break = 1;
56e62a73702836 Sven Schnelle  2020-11-21  315  		current->thread.last_break = last_break;
56e62a73702836 Sven Schnelle  2020-11-21  316  		regs->args[0] = last_break;
56e62a73702836 Sven Schnelle  2020-11-21  317  	}
56e62a73702836 Sven Schnelle  2020-11-21  318  
56e62a73702836 Sven Schnelle  2020-11-21  319  	if (S390_lowcore.pgm_code & 0x0200) {
56e62a73702836 Sven Schnelle  2020-11-21  320  		/* transaction abort */
56e62a73702836 Sven Schnelle  2020-11-21  321  		memcpy(&current->thread.trap_tdb, &S390_lowcore.pgm_tdb, 256);
56e62a73702836 Sven Schnelle  2020-11-21  322  	}
56e62a73702836 Sven Schnelle  2020-11-21  323  
56e62a73702836 Sven Schnelle  2020-11-21  324  	if (S390_lowcore.pgm_code & PGM_INT_CODE_PER) {
56e62a73702836 Sven Schnelle  2020-11-21  325  		if (user_mode(regs)) {
56e62a73702836 Sven Schnelle  2020-11-21  326  			struct per_event *ev = &current->thread.per_event;
56e62a73702836 Sven Schnelle  2020-11-21  327  
56e62a73702836 Sven Schnelle  2020-11-21  328  			set_thread_flag(TIF_PER_TRAP);
56e62a73702836 Sven Schnelle  2020-11-21  329  			ev->address = S390_lowcore.per_address;
56e62a73702836 Sven Schnelle  2020-11-21  330  			ev->cause = *(u16 *)&S390_lowcore.per_code;
56e62a73702836 Sven Schnelle  2020-11-21  331  			ev->paid = S390_lowcore.per_access_id;
56e62a73702836 Sven Schnelle  2020-11-21  332  		} else {
56e62a73702836 Sven Schnelle  2020-11-21  333  			/* PER event in kernel is kprobes */
56e62a73702836 Sven Schnelle  2020-11-21  334  			__arch_local_irq_ssm(regs->psw.mask & ~PSW_MASK_PER);
56e62a73702836 Sven Schnelle  2020-11-21  335  			do_per_trap(regs);
56e62a73702836 Sven Schnelle  2020-11-21  336  			goto out;
56e62a73702836 Sven Schnelle  2020-11-21  337  		}
56e62a73702836 Sven Schnelle  2020-11-21  338  	}
56e62a73702836 Sven Schnelle  2020-11-21  339  
56e62a73702836 Sven Schnelle  2020-11-21  340  	if (!irqs_disabled_flags(regs->psw.mask))
56e62a73702836 Sven Schnelle  2020-11-21  341  		trace_hardirqs_on();
56e62a73702836 Sven Schnelle  2020-11-21  342  	__arch_local_irq_ssm(regs->psw.mask & ~PSW_MASK_PER);
56e62a73702836 Sven Schnelle  2020-11-21  343  
56e62a73702836 Sven Schnelle  2020-11-21  344  	trapnr = regs->int_code & PGM_INT_CODE_MASK;
56e62a73702836 Sven Schnelle  2020-11-21  345  	if (trapnr)
56e62a73702836 Sven Schnelle  2020-11-21  346  		pgm_check_table[trapnr](regs);
56e62a73702836 Sven Schnelle  2020-11-21  347  	syscall_redirect = user_mode(regs) && test_pt_regs_flag(regs, PIF_SYSCALL);
56e62a73702836 Sven Schnelle  2020-11-21  348  out:
56e62a73702836 Sven Schnelle  2020-11-21  349  	local_irq_disable();
56e62a73702836 Sven Schnelle  2020-11-21  350  	irqentry_exit(regs, state);
56e62a73702836 Sven Schnelle  2020-11-21  351  
56e62a73702836 Sven Schnelle  2020-11-21  352  	if (syscall_redirect) {
56e62a73702836 Sven Schnelle  2020-11-21  353  		enter_from_user_mode(regs);
56e62a73702836 Sven Schnelle  2020-11-21  354  		local_irq_enable();
56e62a73702836 Sven Schnelle  2020-11-21  355  		regs->orig_gpr2 = regs->gprs[2];
56e62a73702836 Sven Schnelle  2020-11-21  356  		do_syscall(regs);
56e62a73702836 Sven Schnelle  2020-11-21  357  		exit_to_user_mode();
56e62a73702836 Sven Schnelle  2020-11-21  358  	}
56e62a73702836 Sven Schnelle  2020-11-21  359  }
6f8daa2953ecd1 Heiko Carstens 2021-04-07  360  

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 24722 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Marco Elver <elver@google.com>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	linux-kernel@vger.kernel.org, nathan@kernel.org,
	ndesaulniers@google.com, ojeda@kernel.org, keescook@chromium.org,
	akpm@linux-foundation.org, will@kernel.org, ardb@kernel.org,
	luc.vanoostenryck@gmail.com
Subject: Re: [PATCH] kcov: add __no_sanitize_coverage to fix noinstr for all architectures
Date: Wed, 26 May 2021 06:22:59 +0800	[thread overview]
Message-ID: <202105260629.X6n5yc4D-lkp@intel.com> (raw)
In-Reply-To: <20210525175819.699786-1-elver@google.com>

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

Hi Marco,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linux/master]
[also build test WARNING on kees/for-next/pstore linus/master v5.13-rc3 next-20210525]
[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/Marco-Elver/kcov-add-__no_sanitize_coverage-to-fix-noinstr-for-all-architectures/20210526-020046
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git dd860052c99b1e088352bdd4fb7aef46f8d2ef47
config: s390-randconfig-r002-20210525 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 99155e913e9bad5f7f8a247f8bb3a3ff3da74af1)
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://github.com/0day-ci/linux/commit/d898fa12bc72a46da1b9466bb7f8369949b714a9
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Marco-Elver/kcov-add-__no_sanitize_coverage-to-fix-noinstr-for-all-architectures/20210526-020046
        git checkout d898fa12bc72a46da1b9466bb7f8369949b714a9
        # 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@intel.com>

All warnings (new ones prefixed by >>):

   include/uapi/linux/byteorder/big_endian.h:36:59: note: expanded from macro '__le16_to_cpu'
   #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
                                                             ^
   include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
   #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
                                                        ^
   In file included from arch/s390/kernel/traps.c:29:
   In file included from include/linux/entry-common.h:6:
   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:25:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/s390/include/asm/io.h:75:
   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:115:54: note: expanded from macro '__swab32'
   #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
                                                        ^
   In file included from arch/s390/kernel/traps.c:29:
   In file included from include/linux/entry-common.h:6:
   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:25:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/s390/include/asm/io.h:75:
   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);
                   ~~~~~~~~~~ ^
   In file included from arch/s390/kernel/traps.c:29:
   include/linux/entry-common.h:450:18: warning: unknown sanitizer 'coverage' ignored [-Wunknown-sanitizers]
   irqentry_state_t noinstr irqentry_enter(struct pt_regs *regs);
                    ^
   include/linux/compiler_types.h:213:35: note: expanded from macro 'noinstr'
           __no_kcsan __no_sanitize_address __no_sanitize_coverage
                                            ^
   include/linux/compiler-clang.h:49:59: note: expanded from macro '__no_sanitize_coverage'
   #define __no_sanitize_coverage __attribute__((no_sanitize("coverage")))
                                                             ^
   In file included from arch/s390/kernel/traps.c:29:
   include/linux/entry-common.h:476:6: warning: unknown sanitizer 'coverage' ignored [-Wunknown-sanitizers]
   void noinstr irqentry_exit(struct pt_regs *regs, irqentry_state_t state);
        ^
   include/linux/compiler_types.h:213:35: note: expanded from macro 'noinstr'
           __no_kcsan __no_sanitize_address __no_sanitize_coverage
                                            ^
   include/linux/compiler-clang.h:49:59: note: expanded from macro '__no_sanitize_coverage'
   #define __no_sanitize_coverage __attribute__((no_sanitize("coverage")))
                                                             ^
   In file included from arch/s390/kernel/traps.c:29:
   include/linux/entry-common.h:484:18: warning: unknown sanitizer 'coverage' ignored [-Wunknown-sanitizers]
   irqentry_state_t noinstr irqentry_nmi_enter(struct pt_regs *regs);
                    ^
   include/linux/compiler_types.h:213:35: note: expanded from macro 'noinstr'
           __no_kcsan __no_sanitize_address __no_sanitize_coverage
                                            ^
   include/linux/compiler-clang.h:49:59: note: expanded from macro '__no_sanitize_coverage'
   #define __no_sanitize_coverage __attribute__((no_sanitize("coverage")))
                                                             ^
   In file included from arch/s390/kernel/traps.c:29:
   include/linux/entry-common.h:495:6: warning: unknown sanitizer 'coverage' ignored [-Wunknown-sanitizers]
   void noinstr irqentry_nmi_exit(struct pt_regs *regs, irqentry_state_t irq_state);
        ^
   include/linux/compiler_types.h:213:35: note: expanded from macro 'noinstr'
           __no_kcsan __no_sanitize_address __no_sanitize_coverage
                                            ^
   include/linux/compiler-clang.h:49:59: note: expanded from macro '__no_sanitize_coverage'
   #define __no_sanitize_coverage __attribute__((no_sanitize("coverage")))
                                                             ^
>> arch/s390/kernel/traps.c:299:6: warning: unknown sanitizer 'coverage' ignored [-Wunknown-sanitizers]
   void noinstr __do_pgm_check(struct pt_regs *regs)
        ^
   include/linux/compiler_types.h:213:35: note: expanded from macro 'noinstr'
           __no_kcsan __no_sanitize_address __no_sanitize_coverage
                                            ^
   include/linux/compiler-clang.h:49:59: note: expanded from macro '__no_sanitize_coverage'
   #define __no_sanitize_coverage __attribute__((no_sanitize("coverage")))
                                                             ^
   17 warnings generated.
--
   include/uapi/linux/byteorder/big_endian.h:36:59: note: expanded from macro '__le16_to_cpu'
   #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
                                                             ^
   include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
   #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
                                                        ^
   In file included from arch/s390/kernel/syscall.c:34:
   In file included from include/linux/entry-common.h:6:
   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:25:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/s390/include/asm/io.h:75:
   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:115:54: note: expanded from macro '__swab32'
   #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
                                                        ^
   In file included from arch/s390/kernel/syscall.c:34:
   In file included from include/linux/entry-common.h:6:
   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:25:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/s390/include/asm/io.h:75:
   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);
                   ~~~~~~~~~~ ^
   In file included from arch/s390/kernel/syscall.c:34:
   include/linux/entry-common.h:450:18: warning: unknown sanitizer 'coverage' ignored [-Wunknown-sanitizers]
   irqentry_state_t noinstr irqentry_enter(struct pt_regs *regs);
                    ^
   include/linux/compiler_types.h:213:35: note: expanded from macro 'noinstr'
           __no_kcsan __no_sanitize_address __no_sanitize_coverage
                                            ^
   include/linux/compiler-clang.h:49:59: note: expanded from macro '__no_sanitize_coverage'
   #define __no_sanitize_coverage __attribute__((no_sanitize("coverage")))
                                                             ^
   In file included from arch/s390/kernel/syscall.c:34:
   include/linux/entry-common.h:476:6: warning: unknown sanitizer 'coverage' ignored [-Wunknown-sanitizers]
   void noinstr irqentry_exit(struct pt_regs *regs, irqentry_state_t state);
        ^
   include/linux/compiler_types.h:213:35: note: expanded from macro 'noinstr'
           __no_kcsan __no_sanitize_address __no_sanitize_coverage
                                            ^
   include/linux/compiler-clang.h:49:59: note: expanded from macro '__no_sanitize_coverage'
   #define __no_sanitize_coverage __attribute__((no_sanitize("coverage")))
                                                             ^
   In file included from arch/s390/kernel/syscall.c:34:
   include/linux/entry-common.h:484:18: warning: unknown sanitizer 'coverage' ignored [-Wunknown-sanitizers]
   irqentry_state_t noinstr irqentry_nmi_enter(struct pt_regs *regs);
                    ^
   include/linux/compiler_types.h:213:35: note: expanded from macro 'noinstr'
           __no_kcsan __no_sanitize_address __no_sanitize_coverage
                                            ^
   include/linux/compiler-clang.h:49:59: note: expanded from macro '__no_sanitize_coverage'
   #define __no_sanitize_coverage __attribute__((no_sanitize("coverage")))
                                                             ^
   In file included from arch/s390/kernel/syscall.c:34:
   include/linux/entry-common.h:495:6: warning: unknown sanitizer 'coverage' ignored [-Wunknown-sanitizers]
   void noinstr irqentry_nmi_exit(struct pt_regs *regs, irqentry_state_t irq_state);
        ^
   include/linux/compiler_types.h:213:35: note: expanded from macro 'noinstr'
           __no_kcsan __no_sanitize_address __no_sanitize_coverage
                                            ^
   include/linux/compiler-clang.h:49:59: note: expanded from macro '__no_sanitize_coverage'
   #define __no_sanitize_coverage __attribute__((no_sanitize("coverage")))
                                                             ^
>> arch/s390/kernel/syscall.c:143:6: warning: unknown sanitizer 'coverage' ignored [-Wunknown-sanitizers]
   void noinstr __do_syscall(struct pt_regs *regs, int per_trap)
        ^
   include/linux/compiler_types.h:213:35: note: expanded from macro 'noinstr'
           __no_kcsan __no_sanitize_address __no_sanitize_coverage
                                            ^
   include/linux/compiler-clang.h:49:59: note: expanded from macro '__no_sanitize_coverage'
   #define __no_sanitize_coverage __attribute__((no_sanitize("coverage")))
                                                             ^
   17 warnings generated.
--
   In file included from arch/s390/kernel/nmi.c:33:
   In file included from include/linux/kvm_host.h:33:
   In file included from include/linux/kvm_para.h:5:
   In file included from include/uapi/linux/kvm_para.h:36:
   In file included from arch/s390/include/asm/kvm_para.h:25:
   In file included from arch/s390/include/asm/diag.h:12:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/s390/include/asm/io.h:75:
   include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __raw_readb(PCI_IOBASE + addr);
                             ~~~~~~~~~~ ^
   include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/big_endian.h:36:59: note: expanded from macro '__le16_to_cpu'
   #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
                                                             ^
   include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
   #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
                                                        ^
   In file included from arch/s390/kernel/nmi.c:33:
   In file included from include/linux/kvm_host.h:33:
   In file included from include/linux/kvm_para.h:5:
   In file included from include/uapi/linux/kvm_para.h:36:
   In file included from arch/s390/include/asm/kvm_para.h:25:
   In file included from arch/s390/include/asm/diag.h:12:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/s390/include/asm/io.h:75:
   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:115:54: note: expanded from macro '__swab32'
   #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
                                                        ^
   In file included from arch/s390/kernel/nmi.c:33:
   In file included from include/linux/kvm_host.h:33:
   In file included from include/linux/kvm_para.h:5:
   In file included from include/uapi/linux/kvm_para.h:36:
   In file included from arch/s390/include/asm/kvm_para.h:25:
   In file included from arch/s390/include/asm/diag.h:12:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/s390/include/asm/io.h:75:
   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/nmi.c:182:6: warning: unknown sanitizer 'coverage' ignored [-Wunknown-sanitizers]
   void noinstr s390_handle_mcck(void)
        ^
   include/linux/compiler_types.h:213:35: note: expanded from macro 'noinstr'
           __no_kcsan __no_sanitize_address __no_sanitize_coverage
                                            ^
   include/linux/compiler-clang.h:49:59: note: expanded from macro '__no_sanitize_coverage'
   #define __no_sanitize_coverage __attribute__((no_sanitize("coverage")))
                                                             ^
   13 warnings generated.
..


vim +/coverage +299 arch/s390/kernel/traps.c

6f8daa2953ecd1 Heiko Carstens 2021-04-07  298  
56e62a73702836 Sven Schnelle  2020-11-21 @299  void noinstr __do_pgm_check(struct pt_regs *regs)
56e62a73702836 Sven Schnelle  2020-11-21  300  {
56e62a73702836 Sven Schnelle  2020-11-21  301  	unsigned long last_break = S390_lowcore.breaking_event_addr;
56e62a73702836 Sven Schnelle  2020-11-21  302  	unsigned int trapnr, syscall_redirect = 0;
56e62a73702836 Sven Schnelle  2020-11-21  303  	irqentry_state_t state;
56e62a73702836 Sven Schnelle  2020-11-21  304  
bae1cd368c45d1 Sven Schnelle  2021-04-29  305  	add_random_kstack_offset();
56e62a73702836 Sven Schnelle  2020-11-21  306  	regs->int_code = *(u32 *)&S390_lowcore.pgm_ilc;
56e62a73702836 Sven Schnelle  2020-11-21  307  	regs->int_parm_long = S390_lowcore.trans_exc_code;
56e62a73702836 Sven Schnelle  2020-11-21  308  
56e62a73702836 Sven Schnelle  2020-11-21  309  	state = irqentry_enter(regs);
56e62a73702836 Sven Schnelle  2020-11-21  310  
56e62a73702836 Sven Schnelle  2020-11-21  311  	if (user_mode(regs)) {
56e62a73702836 Sven Schnelle  2020-11-21  312  		update_timer_sys();
56e62a73702836 Sven Schnelle  2020-11-21  313  		if (last_break < 4096)
56e62a73702836 Sven Schnelle  2020-11-21  314  			last_break = 1;
56e62a73702836 Sven Schnelle  2020-11-21  315  		current->thread.last_break = last_break;
56e62a73702836 Sven Schnelle  2020-11-21  316  		regs->args[0] = last_break;
56e62a73702836 Sven Schnelle  2020-11-21  317  	}
56e62a73702836 Sven Schnelle  2020-11-21  318  
56e62a73702836 Sven Schnelle  2020-11-21  319  	if (S390_lowcore.pgm_code & 0x0200) {
56e62a73702836 Sven Schnelle  2020-11-21  320  		/* transaction abort */
56e62a73702836 Sven Schnelle  2020-11-21  321  		memcpy(&current->thread.trap_tdb, &S390_lowcore.pgm_tdb, 256);
56e62a73702836 Sven Schnelle  2020-11-21  322  	}
56e62a73702836 Sven Schnelle  2020-11-21  323  
56e62a73702836 Sven Schnelle  2020-11-21  324  	if (S390_lowcore.pgm_code & PGM_INT_CODE_PER) {
56e62a73702836 Sven Schnelle  2020-11-21  325  		if (user_mode(regs)) {
56e62a73702836 Sven Schnelle  2020-11-21  326  			struct per_event *ev = &current->thread.per_event;
56e62a73702836 Sven Schnelle  2020-11-21  327  
56e62a73702836 Sven Schnelle  2020-11-21  328  			set_thread_flag(TIF_PER_TRAP);
56e62a73702836 Sven Schnelle  2020-11-21  329  			ev->address = S390_lowcore.per_address;
56e62a73702836 Sven Schnelle  2020-11-21  330  			ev->cause = *(u16 *)&S390_lowcore.per_code;
56e62a73702836 Sven Schnelle  2020-11-21  331  			ev->paid = S390_lowcore.per_access_id;
56e62a73702836 Sven Schnelle  2020-11-21  332  		} else {
56e62a73702836 Sven Schnelle  2020-11-21  333  			/* PER event in kernel is kprobes */
56e62a73702836 Sven Schnelle  2020-11-21  334  			__arch_local_irq_ssm(regs->psw.mask & ~PSW_MASK_PER);
56e62a73702836 Sven Schnelle  2020-11-21  335  			do_per_trap(regs);
56e62a73702836 Sven Schnelle  2020-11-21  336  			goto out;
56e62a73702836 Sven Schnelle  2020-11-21  337  		}
56e62a73702836 Sven Schnelle  2020-11-21  338  	}
56e62a73702836 Sven Schnelle  2020-11-21  339  
56e62a73702836 Sven Schnelle  2020-11-21  340  	if (!irqs_disabled_flags(regs->psw.mask))
56e62a73702836 Sven Schnelle  2020-11-21  341  		trace_hardirqs_on();
56e62a73702836 Sven Schnelle  2020-11-21  342  	__arch_local_irq_ssm(regs->psw.mask & ~PSW_MASK_PER);
56e62a73702836 Sven Schnelle  2020-11-21  343  
56e62a73702836 Sven Schnelle  2020-11-21  344  	trapnr = regs->int_code & PGM_INT_CODE_MASK;
56e62a73702836 Sven Schnelle  2020-11-21  345  	if (trapnr)
56e62a73702836 Sven Schnelle  2020-11-21  346  		pgm_check_table[trapnr](regs);
56e62a73702836 Sven Schnelle  2020-11-21  347  	syscall_redirect = user_mode(regs) && test_pt_regs_flag(regs, PIF_SYSCALL);
56e62a73702836 Sven Schnelle  2020-11-21  348  out:
56e62a73702836 Sven Schnelle  2020-11-21  349  	local_irq_disable();
56e62a73702836 Sven Schnelle  2020-11-21  350  	irqentry_exit(regs, state);
56e62a73702836 Sven Schnelle  2020-11-21  351  
56e62a73702836 Sven Schnelle  2020-11-21  352  	if (syscall_redirect) {
56e62a73702836 Sven Schnelle  2020-11-21  353  		enter_from_user_mode(regs);
56e62a73702836 Sven Schnelle  2020-11-21  354  		local_irq_enable();
56e62a73702836 Sven Schnelle  2020-11-21  355  		regs->orig_gpr2 = regs->gprs[2];
56e62a73702836 Sven Schnelle  2020-11-21  356  		do_syscall(regs);
56e62a73702836 Sven Schnelle  2020-11-21  357  		exit_to_user_mode();
56e62a73702836 Sven Schnelle  2020-11-21  358  	}
56e62a73702836 Sven Schnelle  2020-11-21  359  }
6f8daa2953ecd1 Heiko Carstens 2021-04-07  360  

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

  parent reply	other threads:[~2021-05-25 22:22 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-25 17:58 [PATCH] kcov: add __no_sanitize_coverage to fix noinstr for all architectures Marco Elver
2021-05-25 18:25 ` Miguel Ojeda
2021-05-25 19:12   ` Marco Elver
2021-05-26  1:53     ` Miguel Ojeda
2021-05-26  6:25       ` Marco Elver
2021-05-26 12:38         ` Marco Elver
2021-05-26 18:12           ` Miguel Ojeda
2021-05-25 22:22 ` kernel test robot [this message]
2021-05-25 22:22   ` kernel test robot
2021-05-25 22:29   ` Marco Elver
2021-05-25 22:29     ` Marco Elver
2021-05-26  8:11     ` Rong Chen
2021-05-26  8:11       ` [kbuild-all] " Rong Chen
2021-05-25 23:21 ` kernel test robot
2021-05-25 23:21   ` kernel test robot
2021-05-26  8:19 ` Peter Zijlstra

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=202105260629.X6n5yc4D-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.