mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Kees Cook <keescook@chromium.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.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 *'
Date: Mon, 23 Aug 2021 03:37:47 +0800	[thread overview]
Message-ID: <202108230340.D3pugj84-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 9226 bytes --]

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@intel.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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 42268 bytes --]

                 reply	other threads:[~2021-08-22 19:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202108230340.D3pugj84-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®