[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202108230340.D3pugj84-lkp@intel.com>
Date: Mon, 23 Aug 2021 03:37:47 +0800
From: kernel test robot <lkp@...el.com>
To: Kees Cook <keescook@...omium.org>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [kees:kspp/memcpy/next-20210803/v2-devel 86/86]
progs/bpf_iter_netlink.c:11:9: warning: incompatible pointer types returning
'struct inode___50 *' from a function with result type 'struct inode *'
Hi Kees,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git kspp/memcpy/next-20210803/v2-devel
head: 4752984fc24104f399e70f99d48afa047d86a381
commit: 4752984fc24104f399e70f99d48afa047d86a381 [86/86] DEBUG find 0-element destinations
config: x86_64-rhel-8.3-kselftests (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/commit/?id=4752984fc24104f399e70f99d48afa047d86a381
git remote add kees https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git
git fetch --no-tags kees kspp/memcpy/next-20210803/v2-devel
git checkout 4752984fc24104f399e70f99d48afa047d86a381
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> progs/bpf_iter_netlink.c:11:9: warning: incompatible pointer types returning 'struct inode___50 *' from a function with result type 'struct inode *' [-Wincompatible-pointer-types]
return &container_of(socket, struct socket_alloc, socket)->vfs_inode;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> progs/bpf_iter_netlink.c:32:4: warning: incompatible pointer types assigning to 'struct sock *' from 'struct sock___95 *' [-Wincompatible-pointer-types]
s = &nlk->sk;
^ ~~~~~~~~
2 warnings generated.
--
>> progs/bpf_iter_tcp6.c:58:8: warning: incompatible pointer types assigning to 'const struct inode *' from 'struct inode___50 *' [-Wincompatible-pointer-types]
inode = &container_of(sk_socket, struct socket_alloc, socket)->vfs_inode;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
progs/bpf_iter_tcp6.c:89:7: warning: incompatible pointer types assigning to 'const struct inet_sock *' from 'const struct inet_sock___5 *' [-Wincompatible-pointer-types]
inet = &icsk->icsk_inet;
^ ~~~~~~~~~~~~~~~~
>> progs/bpf_iter_tcp6.c:90:5: warning: incompatible pointer types assigning to 'const struct sock *' from 'const struct sock___39 *' [-Wincompatible-pointer-types]
sp = &inet->sk;
^ ~~~~~~~~~
>> progs/bpf_iter_tcp6.c:185:23: warning: incompatible pointer types initializing 'struct request_sock *' with an expression of type 'struct request_sock___54 *' [-Wincompatible-pointer-types]
struct request_sock *req = &irsk->req;
^ ~~~~~~~~~~
4 warnings generated.
--
>> progs/bpf_iter_udp6.c:26:8: warning: incompatible pointer types assigning to 'const struct inode *' from 'struct inode___50 *' [-Wincompatible-pointer-types]
inode = &container_of(sk_socket, struct socket_alloc, socket)->vfs_inode;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
progs/bpf_iter_udp6.c:54:7: warning: incompatible pointer types assigning to 'struct inet_sock *' from 'struct inet_sock___2 *' [-Wincompatible-pointer-types]
inet = &udp_sk->inet;
^ ~~~~~~~~~~~~~
>> progs/bpf_iter_udp6.c:73:21: warning: incompatible pointer types passing 'struct sock___39 *' to parameter of type 'const struct sock *' [-Wincompatible-pointer-types]
sock_i_ino(&inet->sk),
^~~~~~~~~
/tools/include/bpf/bpf_helpers.h:202:24: note: expanded from macro 'BPF_SEQ_PRINTF'
___bpf_fill(___param, args); \
^~~~
/tools/include/bpf/bpf_helpers.h:189:55: note: expanded from macro '___bpf_fill'
___bpf_apply(___bpf_fill, ___bpf_narg(args))(arr, 0, args)
^~~~
/tools/include/bpf/bpf_helpers.h:187:81: note: expanded from macro '___bpf_fill12'
#define ___bpf_fill12(arr, p, x, args...) arr[p] = x; ___bpf_fill11(arr, p + 1, args)
^~~~
note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/tools/include/bpf/bpf_helpers.h:181:79: note: expanded from macro '___bpf_fill6'
#define ___bpf_fill6(arr, p, x, args...) arr[p] = x; ___bpf_fill5(arr, p + 1, args)
^~~~
/tools/include/bpf/bpf_helpers.h:180:79: note: expanded from macro '___bpf_fill5'
#define ___bpf_fill5(arr, p, x, args...) arr[p] = x; ___bpf_fill4(arr, p + 1, args)
^~~~
/tools/include/bpf/bpf_helpers.h:179:51: note: expanded from macro '___bpf_fill4'
#define ___bpf_fill4(arr, p, x, args...) arr[p] = x; ___bpf_fill3(arr, p + 1, args)
^
progs/bpf_iter_udp6.c:17:43: note: passing argument to parameter 'sk' here
static long sock_i_ino(const struct sock *sk)
^
3 warnings generated.
--
>> progs/bpf_iter_udp4.c:19:8: warning: incompatible pointer types assigning to 'const struct inode *' from 'struct inode___50 *' [-Wincompatible-pointer-types]
inode = &container_of(sk_socket, struct socket_alloc, socket)->vfs_inode;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
progs/bpf_iter_udp4.c:46:7: warning: incompatible pointer types assigning to 'struct inet_sock *' from 'struct inet_sock___2 *' [-Wincompatible-pointer-types]
inet = &udp_sk->inet;
^ ~~~~~~~~~~~~~
progs/bpf_iter_udp4.c:50:7: warning: incompatible pointer types assigning to 'struct inet_sock *' from 'struct inet_sock___2 *' [-Wincompatible-pointer-types]
inet = &udp_sk->inet;
^ ~~~~~~~~~~~~~
>> progs/bpf_iter_udp4.c:65:21: warning: incompatible pointer types passing 'struct sock___39 *' to parameter of type 'const struct sock *' [-Wincompatible-pointer-types]
sock_i_ino(&inet->sk),
^~~~~~~~~
/tools/include/bpf/bpf_helpers.h:202:24: note: expanded from macro 'BPF_SEQ_PRINTF'
___bpf_fill(___param, args); \
^~~~
/tools/include/bpf/bpf_helpers.h:189:55: note: expanded from macro '___bpf_fill'
___bpf_apply(___bpf_fill, ___bpf_narg(args))(arr, 0, args)
^~~~
/tools/include/bpf/bpf_helpers.h:187:81: note: expanded from macro '___bpf_fill12'
#define ___bpf_fill12(arr, p, x, args...) arr[p] = x; ___bpf_fill11(arr, p + 1, args)
^~~~
note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/tools/include/bpf/bpf_helpers.h:181:79: note: expanded from macro '___bpf_fill6'
#define ___bpf_fill6(arr, p, x, args...) arr[p] = x; ___bpf_fill5(arr, p + 1, args)
^~~~
/tools/include/bpf/bpf_helpers.h:180:79: note: expanded from macro '___bpf_fill5'
#define ___bpf_fill5(arr, p, x, args...) arr[p] = x; ___bpf_fill4(arr, p + 1, args)
^~~~
/tools/include/bpf/bpf_helpers.h:179:51: note: expanded from macro '___bpf_fill4'
#define ___bpf_fill4(arr, p, x, args...) arr[p] = x; ___bpf_fill3(arr, p + 1, args)
^
progs/bpf_iter_udp4.c:10:43: note: passing argument to parameter 'sk' here
static long sock_i_ino(const struct sock *sk)
^
4 warnings generated.
--
>> progs/bpf_iter_tcp4.c:58:8: warning: incompatible pointer types assigning to 'const struct inode *' from 'struct inode___50 *' [-Wincompatible-pointer-types]
inode = &container_of(sk_socket, struct socket_alloc, socket)->vfs_inode;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
progs/bpf_iter_tcp4.c:89:7: warning: incompatible pointer types assigning to 'const struct inet_sock *' from 'const struct inet_sock___5 *' [-Wincompatible-pointer-types]
inet = &icsk->icsk_inet;
^ ~~~~~~~~~~~~~~~~
>> progs/bpf_iter_tcp4.c:90:5: warning: incompatible pointer types assigning to 'const struct sock *' from 'const struct sock___39 *' [-Wincompatible-pointer-types]
sp = &inet->sk;
^ ~~~~~~~~~
>> progs/bpf_iter_tcp4.c:176:23: warning: incompatible pointer types initializing 'struct request_sock *' with an expression of type 'struct request_sock___54 *' [-Wincompatible-pointer-types]
struct request_sock *req = &irsk->req;
^ ~~~~~~~~~~
4 warnings generated.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (42268 bytes)
Powered by blists - more mailing lists