tree:
https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
arm-kill-set_fs-5
head: 1086c1cb895540fdf215aecf3ed4a96843d6633e
commit: 175180f99fef4558bae0c2fb337150706c4297ea [6/40] ARM: traps: use get_kernel_nofault
instead of set_fs()
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-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 175180f99fef4558bae0c2fb337150706c4297ea
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/arm/kernel/traps.c:82:6: warning: no previous prototype for
'dump_backtrace_stm' [-Wmissing-prototypes]
82 | void dump_backtrace_stm(u32 *stack, u32 instruction, const char *loglvl)
| ^~~~~~~~~~~~~~~~~~
In file included from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:9,
from include/linux/rcuwait.h:6,
from include/linux/percpu-rwsem.h:7,
from include/linux/fs.h:33,
from include/linux/huge_mm.h:8,
from include/linux/mm.h:672,
from include/linux/kallsyms.h:12,
from arch/arm/kernel/traps.c:14:
arch/arm/kernel/traps.c: In function 'dump_mem':
> include/linux/uaccess.h:366:32: error: initialization of
'const long unsigned int *' from incompatible pointer type 'u32 *' {aka
'unsigned int *'} [-Werror=incompatible-pointer-types]
366 | const
typeof(val) *__gk_ptr = (ptr); \
| ^
arch/arm/kernel/traps.c:139:9: note: in expansion of macro
'get_kernel_nofault'
139 | if (get_kernel_nofault(val, (u32 *)p))
| ^~~~~~~~~~~~~~~~~~
arch/arm/kernel/traps.c: At top level:
arch/arm/kernel/traps.c:430:17: warning: no previous prototype for
'do_undefinstr' [-Wmissing-prototypes]
430 | asmlinkage void do_undefinstr(struct pt_regs *regs)
| ^~~~~~~~~~~~~
arch/arm/kernel/traps.c:495:39: warning: no previous prototype for
'handle_fiq_as_nmi' [-Wmissing-prototypes]
495 | asmlinkage void __exception_irq_entry handle_fiq_as_nmi(struct pt_regs *regs)
| ^~~~~~~~~~~~~~~~~
arch/arm/kernel/traps.c:514:17: warning: no previous prototype for 'bad_mode'
[-Wmissing-prototypes]
514 | asmlinkage void bad_mode(struct pt_regs *regs, int reason)
| ^~~~~~~~
arch/arm/kernel/traps.c:587:16: warning: no previous prototype for
'arm_syscall' [-Wmissing-prototypes]
587 | asmlinkage int arm_syscall(int no, struct pt_regs *regs)
| ^~~~~~~~~~~
arch/arm/kernel/traps.c:713:1: warning: no previous prototype for
'baddataabort' [-Wmissing-prototypes]
713 | baddataabort(int code, unsigned long instr, struct pt_regs *regs)
| ^~~~~~~~~~~~
arch/arm/kernel/traps.c:753:17: warning: no previous prototype for '__div0'
[-Wmissing-prototypes]
753 | asmlinkage void __div0(void)
| ^~~~~~
arch/arm/kernel/traps.c:760:6: warning: no previous prototype for 'abort'
[-Wmissing-prototypes]
760 | void abort(void)
| ^~~~~
arch/arm/kernel/traps.c:768:13: warning: no previous prototype for 'trap_init'
[-Wmissing-prototypes]
768 | void __init trap_init(void)
| ^~~~~~~~~
cc1: some warnings being treated as errors
#
https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git/commi...
git remote add arnd-playground
https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
git fetch --no-tags arnd-playground arm-kill-set_fs-5
git checkout 175180f99fef4558bae0c2fb337150706c4297ea
vim +366 include/linux/uaccess.h
1a6877b9c0c2ad9 Alexei Starovoitov 2015-08-28 357
0ab32b6f1b88444 Andrew Morton 2015-11-05 358 /**
25f12ae45fc1931 Christoph Hellwig 2020-06-17 359 * get_kernel_nofault(): safely
attempt to read from a location
25f12ae45fc1931 Christoph Hellwig 2020-06-17 360 * @val: read into this variable
25f12ae45fc1931 Christoph Hellwig 2020-06-17 361 * @ptr: address to read from
0ab32b6f1b88444 Andrew Morton 2015-11-05 362 *
0ab32b6f1b88444 Andrew Morton 2015-11-05 363 * Returns 0 on success, or -EFAULT.
0ab32b6f1b88444 Andrew Morton 2015-11-05 364 */
0c389d89abc28ed Linus Torvalds 2020-06-18 365 #define get_kernel_nofault(val, ptr)
({ \
0c389d89abc28ed Linus Torvalds 2020-06-18 @366 const typeof(val) *__gk_ptr =
(ptr); \
0c389d89abc28ed Linus Torvalds 2020-06-18 367 copy_from_kernel_nofault(&(val),
__gk_ptr, sizeof(val));\
0c389d89abc28ed Linus Torvalds 2020-06-18 368 })
0ab32b6f1b88444 Andrew Morton 2015-11-05 369
:::::: The code at line 366 was first introduced by commit
:::::: 0c389d89abc28edf70ae847ee2fa55acb267b826 maccess: make get_kernel_nofault() check
for minimal type compatibility
:::::: TO: Linus Torvalds <torvalds(a)linux-foundation.org>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org