tree:
git://git.infradead.org/users/hch/misc.git set_fs-removal
head: 8783f2261aa42693c0e738e22036228c2b26d782
commit: 1d7ac476a3ca018b4c1dc83615cae3e0693e0d71 [80/83] powerpc: remove address space
overrides using set_fs()
config: powerpc64-randconfig-r005-20200615 (attached as .config)
compiler: clang version 11.0.0 (
https://github.com/llvm/llvm-project
3d8149c2a1228609fd7d7c91a04681304a2f0ca9)
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 powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
git checkout 1d7ac476a3ca018b4c1dc83615cae3e0693e0d71
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
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 >>, old ones prefixed by <<):
In file included from arch/powerpc/kernel/ptrace/ptrace.c:18:
> include/linux/regset.h:376:7: error: result of comparison of
constant 70368744177663 with expression of type 'unsigned int' is always true
[-Werror,-Wtautological-constant-out-of-range-compare]
if (!access_ok(data, size))
^~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/uaccess.h:37:3: note: expanded from macro 'access_ok'
__access_ok((unsigned long)(addr), (size), TASK_SIZE_MAX - 1))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/uaccess.h:20:34: note: expanded from macro '__access_ok'
(((addr) <= (limit)) && ((size) <= (limit)))
~~~~~~ ^ ~~~~~~~
In file included from arch/powerpc/kernel/ptrace/ptrace.c:18:
include/linux/regset.h:402:7: error: result of comparison of constant 70368744177663 with
expression of type 'unsigned int' is always true
[-Werror,-Wtautological-constant-out-of-range-compare]
if (!access_ok(data, size))
^~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/uaccess.h:37:3: note: expanded from macro 'access_ok'
__access_ok((unsigned long)(addr), (size), TASK_SIZE_MAX - 1))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/uaccess.h:20:34: note: expanded from macro '__access_ok'
(((addr) <= (limit)) && ((size) <= (limit)))
~~~~~~ ^ ~~~~~~~
In file included from arch/powerpc/kernel/ptrace/ptrace.c:19:
In file included from include/linux/tracehook.h:50:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:23:1: error: performing pointer arithmetic on a null
pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
DEF_PCI_AC_RET(inb, u8, (unsigned long port), (port), pio, port)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:592:9: note: expanded from macro 'DEF_PCI_AC_RET'
return __do_##name al; ^~~~~~~~~~~~~~
<scratch space>:20:1: note: expanded from here
__do_inb
^
arch/powerpc/include/asm/io.h:523:53: note: expanded from macro '__do_inb'
#define __do_inb(port) readb((PCI_IO_ADDR)_IO_BASE + port);
~~~~~~~~~~~~~~~~~~~~~ ^
In file included from arch/powerpc/kernel/ptrace/ptrace.c:19:
In file included from include/linux/tracehook.h:50:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:24:1: error: performing pointer arithmetic on a null
pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
DEF_PCI_AC_RET(inw, u16, (unsigned long port), (port), pio, port)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:592:9: note: expanded from macro 'DEF_PCI_AC_RET'
return __do_##name al; ^~~~~~~~~~~~~~
<scratch space>:22:1: note: expanded from here
__do_inw
^
arch/powerpc/include/asm/io.h:524:53: note: expanded from macro '__do_inw'
#define __do_inw(port) readw((PCI_IO_ADDR)_IO_BASE + port);
~~~~~~~~~~~~~~~~~~~~~ ^
In file included from arch/powerpc/kernel/ptrace/ptrace.c:19:
In file included from include/linux/tracehook.h:50:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:25:1: error: performing pointer arithmetic on a null
pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
DEF_PCI_AC_RET(inl, u32, (unsigned long port), (port), pio, port)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:592:9: note: expanded from macro 'DEF_PCI_AC_RET'
return __do_##name al; ^~~~~~~~~~~~~~
<scratch space>:24:1: note: expanded from here
__do_inl
^
arch/powerpc/include/asm/io.h:525:53: note: expanded from macro '__do_inl'
#define __do_inl(port) readl((PCI_IO_ADDR)_IO_BASE + port);
~~~~~~~~~~~~~~~~~~~~~ ^
In file included from arch/powerpc/kernel/ptrace/ptrace.c:19:
In file included from include/linux/tracehook.h:50:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:26:1: error: performing pointer arithmetic on a null
pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outb, (u8 val, unsigned long port), (val, port), pio, port)
--
In file included from arch/powerpc/kernel/ptrace/ptrace-view.c:3:
> include/linux/regset.h:376:7: error: result of comparison of
constant 70368744177663 with expression of type 'unsigned int' is always true
[-Werror,-Wtautological-constant-out-of-range-compare]
if (!access_ok(data, size))
^~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/uaccess.h:37:3: note: expanded from macro 'access_ok'
__access_ok((unsigned long)(addr), (size), TASK_SIZE_MAX - 1))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/uaccess.h:20:34: note: expanded from macro '__access_ok'
(((addr) <= (limit)) && ((size) <= (limit)))
~~~~~~ ^ ~~~~~~~
In file included from arch/powerpc/kernel/ptrace/ptrace-view.c:3:
include/linux/regset.h:402:7: error: result of comparison of constant 70368744177663 with
expression of type 'unsigned int' is always true
[-Werror,-Wtautological-constant-out-of-range-compare]
if (!access_ok(data, size))
^~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/uaccess.h:37:3: note: expanded from macro 'access_ok'
__access_ok((unsigned long)(addr), (size), TASK_SIZE_MAX - 1))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/uaccess.h:20:34: note: expanded from macro '__access_ok'
(((addr) <= (limit)) && ((size) <= (limit)))
~~~~~~ ^ ~~~~~~~
2 errors generated.
--
In file included from include/linux/sched/isolation.h:6:
In file included from include/linux/tick.h:8:
In file included from include/linux/clockchips.h:14:
In file included from include/linux/clocksource.h:21:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; ^~~~~~~~~~~~~~
<scratch space>:191:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:542:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel//sched/core.c:9:
In file included from kernel//sched/sched.h:17:
In file included from include/linux/sched/isolation.h:6:
In file included from include/linux/tick.h:8:
In file included from include/linux/clockchips.h:14:
In file included from include/linux/clocksource.h:21:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; ^~~~~~~~~~~~~~
<scratch space>:193:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel//sched/core.c:9:
In file included from kernel//sched/sched.h:17:
In file included from include/linux/sched/isolation.h:6:
In file included from include/linux/tick.h:8:
In file included from include/linux/clockchips.h:14:
In file included from include/linux/clocksource.h:21:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; ^~~~~~~~~~~~~~
<scratch space>:195:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:544:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel//sched/core.c:9:
In file included from kernel//sched/sched.h:17:
In file included from include/linux/sched/isolation.h:6:
In file included from include/linux/tick.h:8:
In file included from include/linux/clockchips.h:14:
In file included from include/linux/clocksource.h:21:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; ^~~~~~~~~~~~~~
<scratch space>:197:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel//sched/core.c:9:
In file included from kernel//sched/sched.h:17:
In file included from include/linux/sched/isolation.h:6:
In file included from include/linux/tick.h:8:
In file included from include/linux/clockchips.h:14:
In file included from include/linux/clocksource.h:21:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; ^~~~~~~~~~~~~~
<scratch space>:199:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
kernel//sched/core.c:2117:6: warning: no previous prototype for function
'sched_set_stop_task' [-Wmissing-prototypes]
void sched_set_stop_task(int cpu, struct task_struct *stop)
^
kernel//sched/core.c:2117:1: note: declare 'static' if the function is not
intended to be used outside of this translation unit
void sched_set_stop_task(int cpu, struct task_struct *stop)
^
static
> kernel//sched/core.c:5393:7: warning: result of comparison of
constant 70368744177663 with expression of type 'unsigned int' is always true
[-Wtautological-constant-out-of-range-compare]
if (!access_ok(uattr, usize))
^~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/uaccess.h:37:3: note: expanded from macro 'access_ok'
__access_ok((unsigned long)(addr), (size), TASK_SIZE_MAX - 1))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/uaccess.h:20:34: note: expanded from macro '__access_ok'
(((addr) <= (limit)) && ((size) <= (limit)))
~~~~~~ ^ ~~~~~~~
kernel//sched/core.c:808:28: warning: unused function 'uclamp_bucket_base_value'
[-Wunused-function]
static inline unsigned int uclamp_bucket_base_value(unsigned int clamp_value)
^
kernel//sched/core.c:3816:20: warning: unused function 'sched_tick_stop'
[-Wunused-function]
static inline void sched_tick_stop(int cpu) { }
^
16 warnings generated.
vim +376 include/linux/regset.h
bae3f7c39dee59 Roland McGrath 2008-01-30 355
5bde4d181793be Roland McGrath 2008-01-30 356 /**
5bde4d181793be Roland McGrath 2008-01-30 357 * copy_regset_to_user - fetch a
thread's user_regset data into user memory
5bde4d181793be Roland McGrath 2008-01-30 358 * @target: thread to be examined
5bde4d181793be Roland McGrath 2008-01-30 359 * @view: &struct user_regset_view
describing user thread machine state
5bde4d181793be Roland McGrath 2008-01-30 360 * @setno: index in @view->regsets
5bde4d181793be Roland McGrath 2008-01-30 361 * @offset: offset into the regset data, in
bytes
5bde4d181793be Roland McGrath 2008-01-30 362 * @size: amount of data to copy, in bytes
5bde4d181793be Roland McGrath 2008-01-30 363 * @data: user-mode pointer to copy into
5bde4d181793be Roland McGrath 2008-01-30 364 */
5bde4d181793be Roland McGrath 2008-01-30 365 static inline int
copy_regset_to_user(struct task_struct *target,
5bde4d181793be Roland McGrath 2008-01-30 366 const struct user_regset_view
*view,
5bde4d181793be Roland McGrath 2008-01-30 367 unsigned int setno,
5bde4d181793be Roland McGrath 2008-01-30 368 unsigned int offset, unsigned int
size,
5bde4d181793be Roland McGrath 2008-01-30 369 void __user *data)
5bde4d181793be Roland McGrath 2008-01-30 370 {
5bde4d181793be Roland McGrath 2008-01-30 371 const struct user_regset *regset =
&view->regsets[setno];
5bde4d181793be Roland McGrath 2008-01-30 372
c8e252586f8d5d H. Peter Anvin 2012-03-02 373 if (!regset->get)
c8e252586f8d5d H. Peter Anvin 2012-03-02 374 return -EOPNOTSUPP;
c8e252586f8d5d H. Peter Anvin 2012-03-02 375
96d4f267e40f95 Linus Torvalds 2019-01-03 @376 if (!access_ok(data, size))
5189fa19a4b2b4 H. Peter Anvin 2012-03-02 377 return -EFAULT;
5bde4d181793be Roland McGrath 2008-01-30 378
5bde4d181793be Roland McGrath 2008-01-30 379 return regset->get(target, regset,
offset, size, NULL, data);
5bde4d181793be Roland McGrath 2008-01-30 380 }
5bde4d181793be Roland McGrath 2008-01-30 381
:::::: The code at line 376 was first introduced by commit
:::::: 96d4f267e40f9509e8a66e2b39e8b95655617693 Remove 'type' argument from
access_ok() function
:::::: 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