[linux-stable-rc:linux-4.19.y 437/3807] net/core/sock.c:1090: Error: unrecognized opcode `csrs sstatus,s10'

From: kernel test robot
Date: Tue Sep 13 2022 - 01:37:58 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
head: 25c60543745dcb5c04cd98a6353ab78209c242cb
commit: 0512a9aede6e4417c4fa6e0042a7ca8bc7e06b86 [437/3807] af_unix: fix races in sk_peer_pid and sk_peer_cred accesses
config: riscv-randconfig-c032-20220911 (https://download.01.org/0day-ci/archive/20220913/202209131317.seWzh601-lkp@xxxxxxxxx/config)
compiler: riscv64-linux-gcc (GCC) 12.1.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://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=0512a9aede6e4417c4fa6e0042a7ca8bc7e06b86
git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git fetch --no-tags linux-stable-rc linux-4.19.y
git checkout 0512a9aede6e4417c4fa6e0042a7ca8bc7e06b86
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash net/core/

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

All errors (new ones prefixed by >>):

arch/riscv/include/asm/irqflags.h: Assembler messages:
arch/riscv/include/asm/irqflags.h:42: Error: unrecognized opcode `csrrc a4,sstatus,2'
arch/riscv/include/asm/irqflags.h:60: Error: unrecognized opcode `csrs sstatus,a4'
net/core/sock.c:1112: Error: unrecognized opcode `csrs sstatus,a3'
net/core/sock.c:1112: Error: unrecognized opcode `csrc sstatus,a3'
net/core/sock.c:1420: Error: unrecognized opcode `csrs sstatus,a3'
net/core/sock.c:1420: Error: unrecognized opcode `csrc sstatus,a3'
net/core/sock.c:610: Error: unrecognized opcode `csrs sstatus,a4'
net/core/sock.c:610: Error: unrecognized opcode `csrc sstatus,a4'
net/core/sock.c:1267: Error: unrecognized opcode `csrs sstatus,a4'
net/core/sock.c:1267: Error: unrecognized opcode `csrc sstatus,a4'
>> net/core/sock.c:1090: Error: unrecognized opcode `csrs sstatus,s10'
>> net/core/sock.c:1090: Error: unrecognized opcode `csrc sstatus,s10'
arch/riscv/include/asm/irqflags.h:42: Error: unrecognized opcode `csrrc a4,sstatus,2'
arch/riscv/include/asm/irqflags.h:60: Error: unrecognized opcode `csrs sstatus,a4'
arch/riscv/include/asm/irqflags.h:42: Error: unrecognized opcode `csrrc a4,sstatus,2'
arch/riscv/include/asm/irqflags.h:60: Error: unrecognized opcode `csrs sstatus,a4'
net/core/sock.c:673: Error: unrecognized opcode `csrs sstatus,a4'
net/core/sock.c:673: Error: unrecognized opcode `csrc sstatus,a4'


vim +1090 net/core/sock.c

3f551f9436c05a Eric W. Biederman 2010-06-13 1083
28b5ba2aa0f55d David Herrmann 2017-06-21 1084 static int groups_to_user(gid_t __user *dst, const struct group_info *src)
28b5ba2aa0f55d David Herrmann 2017-06-21 1085 {
28b5ba2aa0f55d David Herrmann 2017-06-21 1086 struct user_namespace *user_ns = current_user_ns();
28b5ba2aa0f55d David Herrmann 2017-06-21 1087 int i;
28b5ba2aa0f55d David Herrmann 2017-06-21 1088
28b5ba2aa0f55d David Herrmann 2017-06-21 1089 for (i = 0; i < src->ngroups; i++)
28b5ba2aa0f55d David Herrmann 2017-06-21 @1090 if (put_user(from_kgid_munged(user_ns, src->gid[i]), dst + i))
28b5ba2aa0f55d David Herrmann 2017-06-21 1091 return -EFAULT;
28b5ba2aa0f55d David Herrmann 2017-06-21 1092
28b5ba2aa0f55d David Herrmann 2017-06-21 1093 return 0;
28b5ba2aa0f55d David Herrmann 2017-06-21 1094 }
28b5ba2aa0f55d David Herrmann 2017-06-21 1095

:::::: The code at line 1090 was first introduced by commit
:::::: 28b5ba2aa0f55d80adb2624564ed2b170c19519e net: introduce SO_PEERGROUPS getsockopt

:::::: TO: David Herrmann <dh.herrmann@xxxxxxxxx>
:::::: CC: David S. Miller <davem@xxxxxxxxxxxxx>

--
0-DAY CI Kernel Test Service
https://01.org/lkp