tree:
git://git.infradead.org/users/hch/misc.git set_fs-removal
head: c303c53544a4cea226bd0eca686edc71b65d701e
commit: d9916e81adce4a67f4c5fd01bbcc0ab1ff3b19c9 [14/21] uaccess: add infrastructure for
kernel builds with set_fs()
config: riscv-randconfig-r031-20200808 (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
git checkout d9916e81adce4a67f4c5fd01bbcc0ab1ff3b19c9
# 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 <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
In file included from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:9,
from include/linux/ptrace.h:7,
from arch/riscv/kernel/process.c:15:
include/linux/uaccess.h:11:20: warning: extra tokens at end of #ifdef directive
11 | #ifdef CONFIG_SET_FЅ
| ^
include/linux/uaccess.h:32:3: error: conflicting types for 'mm_segment_t'
32 | } mm_segment_t;
| ^~~~~~~~~~~~
In file included from include/linux/thread_info.h:38,
from include/asm-generic/preempt.h:5,
from ./arch/riscv/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from include/linux/node.h:18,
from include/linux/cpu.h:17,
from arch/riscv/kernel/process.c:10:
arch/riscv/include/asm/thread_info.h:29:3: note: previous declaration of
'mm_segment_t' was here
29 | } mm_segment_t;
| ^~~~~~~~~~~~
In file included from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:9,
from include/linux/ptrace.h:7,
from arch/riscv/kernel/process.c:15:
include/linux/uaccess.h:34: warning: "uaccess_kernel" redefined
34 | #define uaccess_kernel() (false)
|
In file included from arch/riscv/include/asm/uaccess.h:480,
from include/linux/uaccess.h:9,
from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:9,
from include/linux/ptrace.h:7,
from arch/riscv/kernel/process.c:15:
include/asm-generic/uaccess.h:90: note: this is the location of the previous
definition
90 | #define uaccess_kernel() (get_fs().seg == KERNEL_DS.seg)
|
arch/riscv/kernel/process.c:42:6: warning: no previous prototype for
'show_regs' [-Wmissing-prototypes]
42 | void show_regs(struct pt_regs *regs)
| ^~~~~~~~~
In file included from arch/riscv/include/asm/uaccess.h:480,
from include/linux/uaccess.h:9,
from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:9,
from include/linux/ptrace.h:7,
from arch/riscv/kernel/process.c:15:
arch/riscv/kernel/process.c: In function 'start_thread':
> include/asm-generic/uaccess.h:70:42: warning: excess elements in
struct initializer
70 | #define MAKE_MM_SEG(s) ((mm_segment_t) { (s) })
| ^
include/asm-generic/uaccess.h:77:18: note: in expansion of macro 'MAKE_MM_SEG'
77 | #define USER_DS MAKE_MM_SEG(TASK_SIZE - 1)
| ^~~~~~~~~~~
arch/riscv/kernel/process.c:87:9: note: in expansion of macro 'USER_DS'
87 | set_fs(USER_DS);
| ^~~~~~~
include/asm-generic/uaccess.h:70:42: note: (near initialization for
'(anonymous)')
70 | #define MAKE_MM_SEG(s) ((mm_segment_t) { (s) })
| ^
include/asm-generic/uaccess.h:77:18: note: in expansion of macro 'MAKE_MM_SEG'
77 | #define USER_DS MAKE_MM_SEG(TASK_SIZE - 1)
| ^~~~~~~~~~~
arch/riscv/kernel/process.c:87:9: note: in expansion of macro 'USER_DS'
87 | set_fs(USER_DS);
| ^~~~~~~
> include/asm-generic/uaccess.h:70:24: error: incompatible type for
argument 1 of 'set_fs'
70 | #define MAKE_MM_SEG(s) ((mm_segment_t) {
(s) })
| ^~~~~~~~~~~~~~~~~~~~~~~~
| |
| mm_segment_t {aka struct <anonymous>}
include/asm-generic/uaccess.h:77:18: note: in expansion of macro 'MAKE_MM_SEG'
77 | #define USER_DS MAKE_MM_SEG(TASK_SIZE - 1)
| ^~~~~~~~~~~
arch/riscv/kernel/process.c:87:9: note: in expansion of macro 'USER_DS'
87 | set_fs(USER_DS);
| ^~~~~~~
include/asm-generic/uaccess.h:83:40: note: expected 'mm_segment_t' {aka
'struct <anonymous>'} but argument is of type 'mm_segment_t' {aka
'struct <anonymous>'}
83 | static inline void set_fs(mm_segment_t fs)
| ~~~~~~~~~~~~~^~
arch/riscv/kernel/process.c: At top level:
arch/riscv/kernel/process.c:103:5: warning: no previous prototype for
'arch_dup_task_struct' [-Wmissing-prototypes]
103 | int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
| ^~~~~~~~~~~~~~~~~~~~
vim +/set_fs +70 include/asm-generic/uaccess.h
bd79f94758c011 Christoph Hellwig 2019-04-23 69
eed417ddd52146 Arnd Bergmann 2009-05-13 @70 #define MAKE_MM_SEG(s) ((mm_segment_t) {
(s) })
eed417ddd52146 Arnd Bergmann 2009-05-13 71
:::::: The code at line 70 was first introduced by commit
:::::: eed417ddd52146f446595b5a7d8f21b1814b95b7 asm-generic: add a generic uaccess.h
:::::: TO: Arnd Bergmann <arnd(a)arndb.de>
:::::: CC: Arnd Bergmann <arnd(a)klappe2.(none)>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org