public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jisheng Zhang <jszhang3@mail.ustc.edu.cn>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Masahiro Yamada <masahiroy@kernel.org>,
	Michal Marek <michal.lkml@markovi.net>,
	Nick Desaulniers <ndesaulniers@google.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-kbuild@vger.kernel.org
Subject: Re: [PATCH 1/2] riscv: consolidate __ex_table construction
Date: Mon, 18 Oct 2021 08:14:28 +0800	[thread overview]
Message-ID: <202110180820.HH9NB6vw-lkp@intel.com> (raw)
In-Reply-To: <20211017000443.4275747d@xhacker>

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

Hi Jisheng,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.15-rc5 next-20211015]
[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/Jisheng-Zhang/riscv-switch-to-relative-extable/20211017-001318
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 8fe31e0995f048d16b378b90926793a0aa4af1e5
config: riscv-randconfig-r032-20211017 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 746dd6a700931988dd9021d3d04718f1929885a5)
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 riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        # https://github.com/0day-ci/linux/commit/23c273bf6ec4ca672a21dba701725087208dc784
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Jisheng-Zhang/riscv-switch-to-relative-extable/20211017-001318
        git checkout 23c273bf6ec4ca672a21dba701725087208dc784
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash

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 kernel/futex.c:36:
   In file included from include/linux/pagemap.h:11:
   In file included from include/linux/highmem.h:10:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/riscv/include/asm/io.h:136:
   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/little_endian.h:36:51: note: expanded from macro '__le16_to_cpu'
   #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
                                                     ^
   In file included from kernel/futex.c:36:
   In file included from include/linux/pagemap.h:11:
   In file included from include/linux/highmem.h:10:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/riscv/include/asm/io.h:136:
   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/little_endian.h:34:51: note: expanded from macro '__le32_to_cpu'
   #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                                                     ^
   In file included from kernel/futex.c:36:
   In file included from include/linux/pagemap.h:11:
   In file included from include/linux/highmem.h:10:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/riscv/include/asm/io.h:136:
   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:1024:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
                                                     ~~~~~~~~~~ ^
   In file included from kernel/futex.c:43:
>> arch/riscv/include/asm/futex.h:51:3: error: expected ')'
                   __futex_atomic_op("amoswap.w.aqrl %[ov],%z[op],%[u]",
                   ^
   arch/riscv/include/asm/futex.h:33:3: note: expanded from macro '__futex_atomic_op'
                   _ASM_EXTABLE(1b, 3b)                            \
                   ^
   arch/riscv/include/asm/futex.h:55:3: error: expected ')'
                   __futex_atomic_op("amoadd.w.aqrl %[ov],%z[op],%[u]",
                   ^
   arch/riscv/include/asm/futex.h:33:3: note: expanded from macro '__futex_atomic_op'
                   _ASM_EXTABLE(1b, 3b)                            \
                   ^
   arch/riscv/include/asm/futex.h:59:3: error: expected ')'
                   __futex_atomic_op("amoor.w.aqrl %[ov],%z[op],%[u]",
                   ^
   arch/riscv/include/asm/futex.h:33:3: note: expanded from macro '__futex_atomic_op'
                   _ASM_EXTABLE(1b, 3b)                            \
                   ^
   arch/riscv/include/asm/futex.h:63:3: error: expected ')'
                   __futex_atomic_op("amoand.w.aqrl %[ov],%z[op],%[u]",
                   ^
   arch/riscv/include/asm/futex.h:33:3: note: expanded from macro '__futex_atomic_op'
                   _ASM_EXTABLE(1b, 3b)                            \
                   ^
   arch/riscv/include/asm/futex.h:67:3: error: expected ')'
                   __futex_atomic_op("amoxor.w.aqrl %[ov],%z[op],%[u]",
                   ^
   arch/riscv/include/asm/futex.h:33:3: note: expanded from macro '__futex_atomic_op'
                   _ASM_EXTABLE(1b, 3b)                            \
                   ^
   arch/riscv/include/asm/futex.h:103:3: error: expected ')'
                   _ASM_EXTABLE(1b, 4b)                    \
                   ^
   7 warnings and 6 errors generated.


vim +51 arch/riscv/include/asm/futex.h

b90edb33010bcf Jim Wilson 2018-10-16  40  
b90edb33010bcf Jim Wilson 2018-10-16  41  static inline int
b90edb33010bcf Jim Wilson 2018-10-16  42  arch_futex_atomic_op_inuser(int op, int oparg, int *oval, u32 __user *uaddr)
b90edb33010bcf Jim Wilson 2018-10-16  43  {
b90edb33010bcf Jim Wilson 2018-10-16  44  	int oldval = 0, ret = 0;
b90edb33010bcf Jim Wilson 2018-10-16  45  
a08971e9488d12 Al Viro    2020-02-16  46  	if (!access_ok(uaddr, sizeof(u32)))
a08971e9488d12 Al Viro    2020-02-16  47  		return -EFAULT;
b90edb33010bcf Jim Wilson 2018-10-16  48  
b90edb33010bcf Jim Wilson 2018-10-16  49  	switch (op) {
b90edb33010bcf Jim Wilson 2018-10-16  50  	case FUTEX_OP_SET:
b90edb33010bcf Jim Wilson 2018-10-16 @51  		__futex_atomic_op("amoswap.w.aqrl %[ov],%z[op],%[u]",
b90edb33010bcf Jim Wilson 2018-10-16  52  				  ret, oldval, uaddr, oparg);
b90edb33010bcf Jim Wilson 2018-10-16  53  		break;
b90edb33010bcf Jim Wilson 2018-10-16  54  	case FUTEX_OP_ADD:
b90edb33010bcf Jim Wilson 2018-10-16  55  		__futex_atomic_op("amoadd.w.aqrl %[ov],%z[op],%[u]",
b90edb33010bcf Jim Wilson 2018-10-16  56  				  ret, oldval, uaddr, oparg);
b90edb33010bcf Jim Wilson 2018-10-16  57  		break;
b90edb33010bcf Jim Wilson 2018-10-16  58  	case FUTEX_OP_OR:
b90edb33010bcf Jim Wilson 2018-10-16  59  		__futex_atomic_op("amoor.w.aqrl %[ov],%z[op],%[u]",
b90edb33010bcf Jim Wilson 2018-10-16  60  				  ret, oldval, uaddr, oparg);
b90edb33010bcf Jim Wilson 2018-10-16  61  		break;
b90edb33010bcf Jim Wilson 2018-10-16  62  	case FUTEX_OP_ANDN:
b90edb33010bcf Jim Wilson 2018-10-16  63  		__futex_atomic_op("amoand.w.aqrl %[ov],%z[op],%[u]",
b90edb33010bcf Jim Wilson 2018-10-16  64  				  ret, oldval, uaddr, ~oparg);
b90edb33010bcf Jim Wilson 2018-10-16  65  		break;
b90edb33010bcf Jim Wilson 2018-10-16  66  	case FUTEX_OP_XOR:
b90edb33010bcf Jim Wilson 2018-10-16  67  		__futex_atomic_op("amoxor.w.aqrl %[ov],%z[op],%[u]",
b90edb33010bcf Jim Wilson 2018-10-16  68  				  ret, oldval, uaddr, oparg);
b90edb33010bcf Jim Wilson 2018-10-16  69  		break;
b90edb33010bcf Jim Wilson 2018-10-16  70  	default:
b90edb33010bcf Jim Wilson 2018-10-16  71  		ret = -ENOSYS;
b90edb33010bcf Jim Wilson 2018-10-16  72  	}
b90edb33010bcf Jim Wilson 2018-10-16  73  
b90edb33010bcf Jim Wilson 2018-10-16  74  	if (!ret)
b90edb33010bcf Jim Wilson 2018-10-16  75  		*oval = oldval;
b90edb33010bcf Jim Wilson 2018-10-16  76  
b90edb33010bcf Jim Wilson 2018-10-16  77  	return ret;
b90edb33010bcf Jim Wilson 2018-10-16  78  }
b90edb33010bcf Jim Wilson 2018-10-16  79  

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

       reply	other threads:[~2021-10-18  0:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20211017000443.4275747d@xhacker>
2021-10-18  0:14 ` kernel test robot [this message]
2021-10-20 14:03   ` [PATCH 1/2] riscv: consolidate __ex_table construction Jisheng Zhang

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=202110180820.HH9NB6vw-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=jszhang3@mail.ustc.edu.cn \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=llvm@lists.linux.dev \
    --cc=masahiroy@kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=ndesaulniers@google.com \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox