[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202210020826.twyPaaCj-lkp@intel.com>
Date: Sun, 2 Oct 2022 08:57:47 +0800
From: kernel test robot <lkp@...el.com>
To: Aurelien Jarno <aurelien@...el32.net>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Palmer Dabbelt <palmer@...osinc.com>
Subject: include/linux/eventpoll.h:81:13: sparse: sparse: restricted __poll_t
degrades to integer
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b357fd1c2afc1a3e1b73dc4574bb7ac0e3bd4193
commit: 6df2a016c0c8a3d0933ef33dd192ea6606b115e3 riscv: fix build with binutils 2.38
date: 8 months ago
config: riscv-randconfig-s041-20221002
compiler: riscv32-linux-gcc (GCC) 12.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6df2a016c0c8a3d0933ef33dd192ea6606b115e3
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 6df2a016c0c8a3d0933ef33dd192ea6606b115e3
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=riscv SHELL=/bin/bash fs/ net/dccp/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
fs/eventpoll.c: note: in included file:
>> include/linux/eventpoll.h:81:13: sparse: sparse: restricted __poll_t degrades to integer
>> include/linux/eventpoll.h:81:13: sparse: sparse: restricted __poll_t degrades to integer
include/linux/eventpoll.h:81:13: sparse: sparse: cast from restricted __poll_t
--
net/dccp/proto.c:524:52: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected restricted __be32 const [usertype] service @@ got int [addressable] val @@
net/dccp/proto.c:524:52: sparse: expected restricted __be32 const [usertype] service
net/dccp/proto.c:524:52: sparse: got int [addressable] val
>> net/dccp/proto.c:595:13: sparse: sparse: restricted __be32 degrades to integer
>> net/dccp/proto.c:595:13: sparse: sparse: restricted __be32 degrades to integer
net/dccp/proto.c:595:13: sparse: sparse: cast from restricted __be32
net/dccp/proto.c:707:57: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected restricted __be32 [usertype] param @@ got int cmsg_type @@
net/dccp/proto.c:707:57: sparse: expected restricted __be32 [usertype] param
net/dccp/proto.c:707:57: sparse: got int cmsg_type
vim +81 include/linux/eventpoll.h
^1da177e4c3f41 Linus Torvalds 2005-04-16 70
249dbe74d3c4b5 Arnd Bergmann 2021-08-11 71 #if defined(CONFIG_ARM) && defined(CONFIG_OABI_COMPAT)
249dbe74d3c4b5 Arnd Bergmann 2021-08-11 72 /* ARM OABI has an incompatible struct layout and needs a special handler */
249dbe74d3c4b5 Arnd Bergmann 2021-08-11 73 extern struct epoll_event __user *
249dbe74d3c4b5 Arnd Bergmann 2021-08-11 74 epoll_put_uevent(__poll_t revents, __u64 data,
249dbe74d3c4b5 Arnd Bergmann 2021-08-11 75 struct epoll_event __user *uevent);
249dbe74d3c4b5 Arnd Bergmann 2021-08-11 76 #else
249dbe74d3c4b5 Arnd Bergmann 2021-08-11 77 static inline struct epoll_event __user *
249dbe74d3c4b5 Arnd Bergmann 2021-08-11 78 epoll_put_uevent(__poll_t revents, __u64 data,
249dbe74d3c4b5 Arnd Bergmann 2021-08-11 79 struct epoll_event __user *uevent)
249dbe74d3c4b5 Arnd Bergmann 2021-08-11 80 {
249dbe74d3c4b5 Arnd Bergmann 2021-08-11 @81 if (__put_user(revents, &uevent->events) ||
249dbe74d3c4b5 Arnd Bergmann 2021-08-11 82 __put_user(data, &uevent->data))
249dbe74d3c4b5 Arnd Bergmann 2021-08-11 83 return NULL;
249dbe74d3c4b5 Arnd Bergmann 2021-08-11 84
249dbe74d3c4b5 Arnd Bergmann 2021-08-11 85 return uevent+1;
249dbe74d3c4b5 Arnd Bergmann 2021-08-11 86 }
249dbe74d3c4b5 Arnd Bergmann 2021-08-11 87 #endif
249dbe74d3c4b5 Arnd Bergmann 2021-08-11 88
:::::: The code at line 81 was first introduced by commit
:::::: 249dbe74d3c4b568a623fb55c56cddf19fdf0b89 ARM: 9108/1: oabi-compat: rework epoll_wait/epoll_pwait emulation
:::::: TO: Arnd Bergmann <arnd@...db.de>
:::::: CC: Russell King (Oracle) <rmk+kernel@...linux.org.uk>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (164358 bytes)
Powered by blists - more mailing lists