tree:
https://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git f30
head: 2a9c1e3b6c53a78a96a7fd9599f95172fb9e9ac9
commit: 2811f52835b76d7f45858f725b3ede99a57e5001 [69/98] ARM: fix __get_user_check() in
case uaccess_* calls are not inlined
config: arm-randconfig-r025-20200521 (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 2811f52835b76d7f45858f725b3ede99a57e5001
# 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: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
In file included from ./arch/arm/include/generated/uapi/asm/termios.h:1,
from include/uapi/linux/termios.h:6,
from include/linux/tty.h:7,
from drivers/tty/n_tracerouter.c:21:
include/asm-generic/termios.h: In function 'user_termio_to_kernel_termios':
> include/asm-generic/termios.h:25:38: warning: comparison of
unsigned expression < 0 is always false [-Wtype-limits]
25 | if (get_user(tmp,
&termio->c_iflag) < 0)
| ^
include/asm-generic/termios.h:29:38: warning: comparison of unsigned expression < 0 is
always false [-Wtype-limits]
29 | if (get_user(tmp, &termio->c_oflag) < 0)
| ^
include/asm-generic/termios.h:33:38: warning: comparison of unsigned expression < 0 is
always false [-Wtype-limits]
33 | if (get_user(tmp, &termio->c_cflag) < 0)
| ^
include/asm-generic/termios.h:37:38: warning: comparison of unsigned expression < 0 is
always false [-Wtype-limits]
37 | if (get_user(tmp, &termio->c_lflag) < 0)
| ^
include/asm-generic/termios.h:41:49: warning: comparison of unsigned expression < 0 is
always false [-Wtype-limits]
41 | if (get_user(termios->c_line, &termio->c_line) < 0)
| ^
--
In file included from ./arch/arm/include/generated/uapi/asm/termios.h:1,
from include/uapi/linux/termios.h:6,
from include/linux/tty.h:7,
from drivers/tty/tty_ldisc.c:7:
include/asm-generic/termios.h: In function 'user_termio_to_kernel_termios':
> include/asm-generic/termios.h:25:38: warning: comparison of
unsigned expression < 0 is always false [-Wtype-limits]
25 | if (get_user(tmp,
&termio->c_iflag) < 0)
| ^
include/asm-generic/termios.h:29:38: warning: comparison of unsigned expression < 0 is
always false [-Wtype-limits]
29 | if (get_user(tmp, &termio->c_oflag) < 0)
| ^
include/asm-generic/termios.h:33:38: warning: comparison of unsigned expression < 0 is
always false [-Wtype-limits]
33 | if (get_user(tmp, &termio->c_cflag) < 0)
| ^
include/asm-generic/termios.h:37:38: warning: comparison of unsigned expression < 0 is
always false [-Wtype-limits]
37 | if (get_user(tmp, &termio->c_lflag) < 0)
| ^
include/asm-generic/termios.h:41:49: warning: comparison of unsigned expression < 0 is
always false [-Wtype-limits]
41 | if (get_user(termios->c_line, &termio->c_line) < 0)
| ^
drivers/tty/tty_ldisc.c: At top level:
drivers/tty/tty_ldisc.c:884:6: warning: no previous prototype for
'tty_sysctl_init' [-Wmissing-prototypes]
884 | void tty_sysctl_init(void)
| ^~~~~~~~~~~~~~~
--
In file included from ./arch/arm/include/generated/uapi/asm/termios.h:1,
from include/uapi/linux/termios.h:6,
from include/linux/serdev.h:10,
from drivers/tty/serdev/core.c:19:
include/asm-generic/termios.h: In function 'user_termio_to_kernel_termios':
> include/asm-generic/termios.h:25:38: warning: comparison of
unsigned expression < 0 is always false [-Wtype-limits]
25 | if (get_user(tmp,
&termio->c_iflag) < 0)
| ^
include/asm-generic/termios.h:29:38: warning: comparison of unsigned expression < 0 is
always false [-Wtype-limits]
29 | if (get_user(tmp, &termio->c_oflag) < 0)
| ^
include/asm-generic/termios.h:33:38: warning: comparison of unsigned expression < 0 is
always false [-Wtype-limits]
33 | if (get_user(tmp, &termio->c_cflag) < 0)
| ^
include/asm-generic/termios.h:37:38: warning: comparison of unsigned expression < 0 is
always false [-Wtype-limits]
37 | if (get_user(tmp, &termio->c_lflag) < 0)
| ^
include/asm-generic/termios.h:41:49: warning: comparison of unsigned expression < 0 is
always false [-Wtype-limits]
41 | if (get_user(termios->c_line, &termio->c_line) < 0)
| ^
drivers/tty/serdev/core.c: In function 'serdev_controller_remove':
drivers/tty/serdev/core.c:791:6: warning: variable 'dummy' set but not used
[-Wunused-but-set-variable]
791 | int dummy;
| ^~~~~
--
In file included from ./arch/arm/include/generated/uapi/asm/termios.h:1,
from include/uapi/linux/termios.h:6,
from include/linux/tty.h:7,
from include/linux/serial_core.h:17,
from drivers/tty/serial/8250/serial_cs.c:42:
include/asm-generic/termios.h: In function 'user_termio_to_kernel_termios':
> include/asm-generic/termios.h:25:38: warning: comparison of
unsigned expression < 0 is always false [-Wtype-limits]
25 | if (get_user(tmp,
&termio->c_iflag) < 0)
| ^
include/asm-generic/termios.h:29:38: warning: comparison of unsigned expression < 0 is
always false [-Wtype-limits]
29 | if (get_user(tmp, &termio->c_oflag) < 0)
| ^
include/asm-generic/termios.h:33:38: warning: comparison of unsigned expression < 0 is
always false [-Wtype-limits]
33 | if (get_user(tmp, &termio->c_cflag) < 0)
| ^
include/asm-generic/termios.h:37:38: warning: comparison of unsigned expression < 0 is
always false [-Wtype-limits]
37 | if (get_user(tmp, &termio->c_lflag) < 0)
| ^
include/asm-generic/termios.h:41:49: warning: comparison of unsigned expression < 0 is
always false [-Wtype-limits]
41 | if (get_user(termios->c_line, &termio->c_line) < 0)
| ^
drivers/tty/serial/8250/serial_cs.c: In function 'multi_config':
drivers/tty/serial/8250/serial_cs.c:562:7: warning: variable 'err' set but not
used [-Wunused-but-set-variable]
562 | int err;
| ^~~
--
In file included from ./arch/arm/include/generated/uapi/asm/termios.h:1,
from include/uapi/linux/termios.h:6,
from include/linux/tty.h:7,
from drivers/tty/serial/8250/8250_core.c:26:
include/asm-generic/termios.h: In function 'user_termio_to_kernel_termios':
> include/asm-generic/termios.h:25:38: warning: comparison of
unsigned expression < 0 is always false [-Wtype-limits]
25 | if (get_user(tmp,
&termio->c_iflag) < 0)
| ^
include/asm-generic/termios.h:29:38: warning: comparison of unsigned expression < 0 is
always false [-Wtype-limits]
29 | if (get_user(tmp, &termio->c_oflag) < 0)
| ^
include/asm-generic/termios.h:33:38: warning: comparison of unsigned expression < 0 is
always false [-Wtype-limits]
33 | if (get_user(tmp, &termio->c_cflag) < 0)
| ^
include/asm-generic/termios.h:37:38: warning: comparison of unsigned expression < 0 is
always false [-Wtype-limits]
37 | if (get_user(tmp, &termio->c_lflag) < 0)
| ^
include/asm-generic/termios.h:41:49: warning: comparison of unsigned expression < 0 is
always false [-Wtype-limits]
41 | if (get_user(termios->c_line, &termio->c_line) < 0)
| ^
drivers/tty/serial/8250/8250_core.c: In function 'serial8250_isa_init_ports':
drivers/tty/serial/8250/8250_core.c:537:9: warning: comparison of unsigned expression <
0 is always false [-Wtype-limits]
537 | i < ARRAY_SIZE(old_serial_port) && i < nr_uarts;
| ^
--
In file included from ./arch/arm/include/generated/uapi/asm/termios.h:1,
from include/uapi/linux/termios.h:6,
from include/linux/tty.h:7,
from drivers/tty/serial/jsm/jsm_cls.c:23:
include/asm-generic/termios.h: In function 'user_termio_to_kernel_termios':
> include/asm-generic/termios.h:25:38: warning: comparison of
unsigned expression < 0 is always false [-Wtype-limits]
25 | if (get_user(tmp,
&termio->c_iflag) < 0)
| ^
include/asm-generic/termios.h:29:38: warning: comparison of unsigned expression < 0 is
always false [-Wtype-limits]
29 | if (get_user(tmp, &termio->c_oflag) < 0)
| ^
include/asm-generic/termios.h:33:38: warning: comparison of unsigned expression < 0 is
always false [-Wtype-limits]
33 | if (get_user(tmp, &termio->c_cflag) < 0)
| ^
include/asm-generic/termios.h:37:38: warning: comparison of unsigned expression < 0 is
always false [-Wtype-limits]
37 | if (get_user(tmp, &termio->c_lflag) < 0)
| ^
include/asm-generic/termios.h:41:49: warning: comparison of unsigned expression < 0 is
always false [-Wtype-limits]
41 | if (get_user(termios->c_line, &termio->c_line) < 0)
| ^
drivers/tty/serial/jsm/jsm_cls.c: In function 'cls_copy_data_from_uart_to_queue':
drivers/tty/serial/jsm/jsm_cls.c:400:7: warning: variable 'discard' set but not
used [-Wunused-but-set-variable]
400 | u8 discard;
| ^~~~~~~
vim +25 include/asm-generic/termios.h
6103ec56c65c33 Arnd Bergmann 2009-05-13 16
6103ec56c65c33 Arnd Bergmann 2009-05-13 17 /*
6103ec56c65c33 Arnd Bergmann 2009-05-13 18 * Translate a "termio" structure
into a "termios". Ugh.
6103ec56c65c33 Arnd Bergmann 2009-05-13 19 */
6103ec56c65c33 Arnd Bergmann 2009-05-13 20 static inline int
user_termio_to_kernel_termios(struct ktermios *termios,
6103ec56c65c33 Arnd Bergmann 2009-05-13 21 const struct termio __user *termio)
6103ec56c65c33 Arnd Bergmann 2009-05-13 22 {
6103ec56c65c33 Arnd Bergmann 2009-05-13 23 unsigned short tmp;
6103ec56c65c33 Arnd Bergmann 2009-05-13 24
6103ec56c65c33 Arnd Bergmann 2009-05-13 @25 if (get_user(tmp, &termio->c_iflag)
< 0)
6103ec56c65c33 Arnd Bergmann 2009-05-13 26 goto fault;
6103ec56c65c33 Arnd Bergmann 2009-05-13 27 termios->c_iflag = (0xffff0000 &
termios->c_iflag) | tmp;
6103ec56c65c33 Arnd Bergmann 2009-05-13 28
6103ec56c65c33 Arnd Bergmann 2009-05-13 29 if (get_user(tmp, &termio->c_oflag)
< 0)
6103ec56c65c33 Arnd Bergmann 2009-05-13 30 goto fault;
6103ec56c65c33 Arnd Bergmann 2009-05-13 31 termios->c_oflag = (0xffff0000 &
termios->c_oflag) | tmp;
6103ec56c65c33 Arnd Bergmann 2009-05-13 32
6103ec56c65c33 Arnd Bergmann 2009-05-13 33 if (get_user(tmp, &termio->c_cflag)
< 0)
6103ec56c65c33 Arnd Bergmann 2009-05-13 34 goto fault;
6103ec56c65c33 Arnd Bergmann 2009-05-13 35 termios->c_cflag = (0xffff0000 &
termios->c_cflag) | tmp;
6103ec56c65c33 Arnd Bergmann 2009-05-13 36
6103ec56c65c33 Arnd Bergmann 2009-05-13 37 if (get_user(tmp, &termio->c_lflag)
< 0)
6103ec56c65c33 Arnd Bergmann 2009-05-13 38 goto fault;
6103ec56c65c33 Arnd Bergmann 2009-05-13 39 termios->c_lflag = (0xffff0000 &
termios->c_lflag) | tmp;
6103ec56c65c33 Arnd Bergmann 2009-05-13 40
6103ec56c65c33 Arnd Bergmann 2009-05-13 41 if (get_user(termios->c_line,
&termio->c_line) < 0)
6103ec56c65c33 Arnd Bergmann 2009-05-13 42 goto fault;
6103ec56c65c33 Arnd Bergmann 2009-05-13 43
6103ec56c65c33 Arnd Bergmann 2009-05-13 44 if (copy_from_user(termios->c_cc,
termio->c_cc, NCC) != 0)
6103ec56c65c33 Arnd Bergmann 2009-05-13 45 goto fault;
6103ec56c65c33 Arnd Bergmann 2009-05-13 46
6103ec56c65c33 Arnd Bergmann 2009-05-13 47 return 0;
6103ec56c65c33 Arnd Bergmann 2009-05-13 48
6103ec56c65c33 Arnd Bergmann 2009-05-13 49 fault:
6103ec56c65c33 Arnd Bergmann 2009-05-13 50 return -EFAULT;
6103ec56c65c33 Arnd Bergmann 2009-05-13 51 }
6103ec56c65c33 Arnd Bergmann 2009-05-13 52
:::::: The code at line 25 was first introduced by commit
:::::: 6103ec56c65c33774c7c38652c8204120c3c7519 asm-generic: add generic ABI headers
:::::: 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