tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tmp.tmp2 head: adcceb5eb7aee38e4a9c15bdf599655f0e1b1324 commit: 6ca85f643325cbbcd70bc08bfab7ee67c26b8607 [154/364] sched/headers: Remove from config: riscv-nommu_k210_defconfig (attached as .config) compiler: riscv64-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://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=6ca85f643325cbbcd70bc08bfab7ee67c26b8607 git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git git fetch --no-tags tip tmp.tmp2 git checkout 6ca85f643325cbbcd70bc08bfab7ee67c26b8607 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): In file included from include/linux/sched.h:25, from arch/riscv/kernel/asm-offsets.c:10: include/linux/syscall_user_dispatch.h: In function 'set_syscall_user_dispatch': >> include/linux/syscall_user_dispatch.h:29:10: error: 'EINVAL' undeclared (first use in this function) 29 | return -EINVAL; | ^~~~~~ include/linux/syscall_user_dispatch.h:29:10: note: each undeclared identifier is reported only once for each function it appears in In file included from arch/riscv/kernel/asm-offsets.c:9: arch/riscv/kernel/asm-offsets.c: In function 'asm_offsets': include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread' 140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b) | ^~~~~~~~~~~~~~~~~~ include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE' 6 | asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val)) | ^~~ include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof' 17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) | ^~~~~~~~~~~~~~~~~~~ include/linux/kbuild.h:11:14: note: in expansion of macro 'offsetof' 11 | DEFINE(sym, offsetof(struct str, mem)) | ^~~~~~~~ arch/riscv/kernel/asm-offsets.c:18:2: note: in expansion of macro 'OFFSET' 18 | OFFSET(TASK_THREAD_RA, task_struct, thread.ra); | ^~~~~~ include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread' 140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b) | ^~~~~~~~~~~~~~~~~~ include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE' 6 | asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val)) | ^~~ include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof' 17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) | ^~~~~~~~~~~~~~~~~~~ include/linux/kbuild.h:11:14: note: in expansion of macro 'offsetof' 11 | DEFINE(sym, offsetof(struct str, mem)) | ^~~~~~~~ arch/riscv/kernel/asm-offsets.c:19:2: note: in expansion of macro 'OFFSET' 19 | OFFSET(TASK_THREAD_SP, task_struct, thread.sp); | ^~~~~~ include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread' 140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b) | ^~~~~~~~~~~~~~~~~~ include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE' 6 | asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val)) | ^~~ include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof' 17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) | ^~~~~~~~~~~~~~~~~~~ include/linux/kbuild.h:11:14: note: in expansion of macro 'offsetof' 11 | DEFINE(sym, offsetof(struct str, mem)) | ^~~~~~~~ arch/riscv/kernel/asm-offsets.c:20:2: note: in expansion of macro 'OFFSET' 20 | OFFSET(TASK_THREAD_S0, task_struct, thread.s[0]); | ^~~~~~ include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread' 140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b) | ^~~~~~~~~~~~~~~~~~ include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE' 6 | asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val)) | ^~~ include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof' 17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) | ^~~~~~~~~~~~~~~~~~~ include/linux/kbuild.h:11:14: note: in expansion of macro 'offsetof' 11 | DEFINE(sym, offsetof(struct str, mem)) | ^~~~~~~~ arch/riscv/kernel/asm-offsets.c:21:2: note: in expansion of macro 'OFFSET' 21 | OFFSET(TASK_THREAD_S1, task_struct, thread.s[1]); | ^~~~~~ include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread' 140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b) | ^~~~~~~~~~~~~~~~~~ include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE' 6 | asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val)) | ^~~ include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof' 17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) | ^~~~~~~~~~~~~~~~~~~ include/linux/kbuild.h:11:14: note: in expansion of macro 'offsetof' 11 | DEFINE(sym, offsetof(struct str, mem)) | ^~~~~~~~ arch/riscv/kernel/asm-offsets.c:22:2: note: in expansion of macro 'OFFSET' 22 | OFFSET(TASK_THREAD_S2, task_struct, thread.s[2]); | ^~~~~~ include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread' 140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b) | ^~~~~~~~~~~~~~~~~~ include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE' 6 | asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val)) | ^~~ include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof' 17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) | ^~~~~~~~~~~~~~~~~~~ include/linux/kbuild.h:11:14: note: in expansion of macro 'offsetof' 11 | DEFINE(sym, offsetof(struct str, mem)) | ^~~~~~~~ arch/riscv/kernel/asm-offsets.c:23:2: note: in expansion of macro 'OFFSET' 23 | OFFSET(TASK_THREAD_S3, task_struct, thread.s[3]); | ^~~~~~ include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread' 140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b) | ^~~~~~~~~~~~~~~~~~ include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE' 6 | asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val)) -- In file included from include/linux/sched.h:25, from arch/riscv/kernel/asm-offsets.c:10: include/linux/syscall_user_dispatch.h: In function 'set_syscall_user_dispatch': >> include/linux/syscall_user_dispatch.h:29:10: error: 'EINVAL' undeclared (first use in this function) 29 | return -EINVAL; | ^~~~~~ include/linux/syscall_user_dispatch.h:29:10: note: each undeclared identifier is reported only once for each function it appears in In file included from arch/riscv/kernel/asm-offsets.c:9: arch/riscv/kernel/asm-offsets.c: In function 'asm_offsets': include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread' 140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b) | ^~~~~~~~~~~~~~~~~~ include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE' 6 | asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val)) | ^~~ include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof' 17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) | ^~~~~~~~~~~~~~~~~~~ include/linux/kbuild.h:11:14: note: in expansion of macro 'offsetof' 11 | DEFINE(sym, offsetof(struct str, mem)) | ^~~~~~~~ arch/riscv/kernel/asm-offsets.c:18:2: note: in expansion of macro 'OFFSET' 18 | OFFSET(TASK_THREAD_RA, task_struct, thread.ra); | ^~~~~~ include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread' 140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b) | ^~~~~~~~~~~~~~~~~~ include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE' 6 | asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val)) | ^~~ include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof' 17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) | ^~~~~~~~~~~~~~~~~~~ include/linux/kbuild.h:11:14: note: in expansion of macro 'offsetof' 11 | DEFINE(sym, offsetof(struct str, mem)) | ^~~~~~~~ arch/riscv/kernel/asm-offsets.c:19:2: note: in expansion of macro 'OFFSET' 19 | OFFSET(TASK_THREAD_SP, task_struct, thread.sp); | ^~~~~~ include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread' 140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b) | ^~~~~~~~~~~~~~~~~~ include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE' 6 | asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val)) | ^~~ include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof' 17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) | ^~~~~~~~~~~~~~~~~~~ include/linux/kbuild.h:11:14: note: in expansion of macro 'offsetof' 11 | DEFINE(sym, offsetof(struct str, mem)) | ^~~~~~~~ arch/riscv/kernel/asm-offsets.c:20:2: note: in expansion of macro 'OFFSET' 20 | OFFSET(TASK_THREAD_S0, task_struct, thread.s[0]); | ^~~~~~ include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread' 140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b) | ^~~~~~~~~~~~~~~~~~ include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE' 6 | asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val)) | ^~~ include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof' 17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) | ^~~~~~~~~~~~~~~~~~~ include/linux/kbuild.h:11:14: note: in expansion of macro 'offsetof' 11 | DEFINE(sym, offsetof(struct str, mem)) | ^~~~~~~~ arch/riscv/kernel/asm-offsets.c:21:2: note: in expansion of macro 'OFFSET' 21 | OFFSET(TASK_THREAD_S1, task_struct, thread.s[1]); | ^~~~~~ include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread' 140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b) | ^~~~~~~~~~~~~~~~~~ include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE' 6 | asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val)) | ^~~ include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof' 17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) | ^~~~~~~~~~~~~~~~~~~ include/linux/kbuild.h:11:14: note: in expansion of macro 'offsetof' 11 | DEFINE(sym, offsetof(struct str, mem)) | ^~~~~~~~ arch/riscv/kernel/asm-offsets.c:22:2: note: in expansion of macro 'OFFSET' 22 | OFFSET(TASK_THREAD_S2, task_struct, thread.s[2]); | ^~~~~~ include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread' 140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b) | ^~~~~~~~~~~~~~~~~~ include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE' 6 | asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val)) | ^~~ include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof' 17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) | ^~~~~~~~~~~~~~~~~~~ include/linux/kbuild.h:11:14: note: in expansion of macro 'offsetof' 11 | DEFINE(sym, offsetof(struct str, mem)) | ^~~~~~~~ arch/riscv/kernel/asm-offsets.c:23:2: note: in expansion of macro 'OFFSET' 23 | OFFSET(TASK_THREAD_S3, task_struct, thread.s[3]); | ^~~~~~ include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread' 140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b) | ^~~~~~~~~~~~~~~~~~ include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE' 6 | asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val)) vim +/EINVAL +29 include/linux/syscall_user_dispatch.h 1446e1df9eb183 Gabriel Krisman Bertazi 2020-11-27 25 1446e1df9eb183 Gabriel Krisman Bertazi 2020-11-27 26 static inline int set_syscall_user_dispatch(unsigned long mode, unsigned long offset, 1446e1df9eb183 Gabriel Krisman Bertazi 2020-11-27 27 unsigned long len, char __user *selector) 1446e1df9eb183 Gabriel Krisman Bertazi 2020-11-27 28 { 1446e1df9eb183 Gabriel Krisman Bertazi 2020-11-27 @29 return -EINVAL; 1446e1df9eb183 Gabriel Krisman Bertazi 2020-11-27 30 } 1446e1df9eb183 Gabriel Krisman Bertazi 2020-11-27 31 :::::: The code at line 29 was first introduced by commit :::::: 1446e1df9eb183fdf81c3f0715402f1d7595d4cb kernel: Implement selective syscall userspace redirection :::::: TO: Gabriel Krisman Bertazi :::::: CC: Thomas Gleixner --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org