Hi Kuniyuki, kernel test robot noticed the following build warnings: [auto build test WARNING on bpf-next/net] url: https://github.com/intel-lab-lkp/linux/commits/Kuniyuki-Iwashima/tcp-Save-lock_sock-for-memcg-in-inet_csk_accept/20250823-062322 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git net patch link: https://lore.kernel.org/r/20250822221846.744252-6-kuniyu%40google.com patch subject: [PATCH v1 bpf-next/net 5/8] bpf: Support bpf_setsockopt() for BPF_CGROUP_INET_SOCK_(CREATE|ACCEPT). config: arm-randconfig-r131-20250824 (https://download.01.org/0day-ci/archive/20250824/202508240731.UPB4k4Uo-lkp@xxxxxxxxx/config) compiler: arm-linux-gnueabi-gcc (GCC) 8.5.0 reproduce: (https://download.01.org/0day-ci/archive/20250824/202508240731.UPB4k4Uo-lkp@xxxxxxxxx/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202508240731.UPB4k4Uo-lkp@xxxxxxxxx/ sparse warnings: (new ones prefixed by >>) net/core/filter.c:6322:9: sparse: sparse: switch with no cases net/core/filter.c:6363:9: sparse: sparse: switch with no cases net/core/filter.c:1440:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct sock_filter const *filter @@ got struct sock_filter [noderef] __user *filter @@ net/core/filter.c:1440:39: sparse: expected struct sock_filter const *filter net/core/filter.c:1440:39: sparse: got struct sock_filter [noderef] __user *filter net/core/filter.c:1518:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct sock_filter const *filter @@ got struct sock_filter [noderef] __user *filter @@ net/core/filter.c:1518:39: sparse: expected struct sock_filter const *filter net/core/filter.c:1518:39: sparse: got struct sock_filter [noderef] __user *filter >> net/core/filter.c:5752:29: sparse: sparse: symbol 'bpf_sock_setsockopt_proto' was not declared. Should it be static? >> net/core/filter.c:5769:29: sparse: sparse: symbol 'bpf_unlocked_sock_setsockopt_proto' was not declared. Should it be static? net/core/filter.c:11166:31: sparse: sparse: symbol 'cg_skb_verifier_ops' was not declared. Should it be static? net/core/filter.c:11172:27: sparse: sparse: symbol 'cg_skb_prog_ops' was not declared. Should it be static? net/core/filter.c:11216:31: sparse: sparse: symbol 'cg_sock_verifier_ops' was not declared. Should it be static? net/core/filter.c:11222:27: sparse: sparse: symbol 'cg_sock_prog_ops' was not declared. Should it be static? net/core/filter.c:11225:31: sparse: sparse: symbol 'cg_sock_addr_verifier_ops' was not declared. Should it be static? net/core/filter.c:11231:27: sparse: sparse: symbol 'cg_sock_addr_prog_ops' was not declared. Should it be static? net/core/filter.c:1948:43: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected restricted __wsum [usertype] diff @@ got unsigned long long [usertype] to @@ net/core/filter.c:1948:43: sparse: expected restricted __wsum [usertype] diff net/core/filter.c:1948:43: sparse: got unsigned long long [usertype] to net/core/filter.c:1951:36: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected restricted __be16 [usertype] old @@ got unsigned long long [usertype] from @@ net/core/filter.c:1951:36: sparse: expected restricted __be16 [usertype] old net/core/filter.c:1951:36: sparse: got unsigned long long [usertype] from net/core/filter.c:1951:42: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted __be16 [usertype] new @@ got unsigned long long [usertype] to @@ net/core/filter.c:1951:42: sparse: expected restricted __be16 [usertype] new net/core/filter.c:1951:42: sparse: got unsigned long long [usertype] to net/core/filter.c:1954:36: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected restricted __be32 [usertype] from @@ got unsigned long long [usertype] from @@ net/core/filter.c:1954:36: sparse: expected restricted __be32 [usertype] from net/core/filter.c:1954:36: sparse: got unsigned long long [usertype] from net/core/filter.c:1954:42: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted __be32 [usertype] to @@ got unsigned long long [usertype] to @@ net/core/filter.c:1954:42: sparse: expected restricted __be32 [usertype] to net/core/filter.c:1954:42: sparse: got unsigned long long [usertype] to net/core/filter.c:2000:59: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted __wsum [usertype] diff @@ got unsigned long long [usertype] to @@ net/core/filter.c:2000:59: sparse: expected restricted __wsum [usertype] diff net/core/filter.c:2000:59: sparse: got unsigned long long [usertype] to net/core/filter.c:2003:52: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted __be16 [usertype] from @@ got unsigned long long [usertype] from @@ net/core/filter.c:2003:52: sparse: expected restricted __be16 [usertype] from net/core/filter.c:2003:52: sparse: got unsigned long long [usertype] from net/core/filter.c:2003:58: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected restricted __be16 [usertype] to @@ got unsigned long long [usertype] to @@ net/core/filter.c:2003:58: sparse: expected restricted __be16 [usertype] to net/core/filter.c:2003:58: sparse: got unsigned long long [usertype] to net/core/filter.c:2006:52: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted __be32 [usertype] from @@ got unsigned long long [usertype] from @@ net/core/filter.c:2006:52: sparse: expected restricted __be32 [usertype] from net/core/filter.c:2006:52: sparse: got unsigned long long [usertype] from net/core/filter.c:2006:58: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected restricted __be32 [usertype] to @@ got unsigned long long [usertype] to @@ net/core/filter.c:2006:58: sparse: expected restricted __be32 [usertype] to net/core/filter.c:2006:58: sparse: got unsigned long long [usertype] to net/core/filter.c:2073:35: sparse: sparse: incorrect type in return expression (different base types) @@ expected unsigned long long @@ got restricted __wsum [usertype] csum @@ net/core/filter.c:2073:35: sparse: expected unsigned long long net/core/filter.c:2073:35: sparse: got restricted __wsum [usertype] csum vim +/bpf_sock_setsockopt_proto +5752 net/core/filter.c 5751 > 5752 const struct bpf_func_proto bpf_sock_setsockopt_proto = { 5753 .func = bpf_sock_setsockopt, 5754 .gpl_only = false, 5755 .ret_type = RET_INTEGER, 5756 .arg1_type = ARG_PTR_TO_CTX, 5757 .arg2_type = ARG_ANYTHING, 5758 .arg3_type = ARG_ANYTHING, 5759 .arg4_type = ARG_PTR_TO_MEM | MEM_RDONLY, 5760 .arg5_type = ARG_CONST_SIZE, 5761 }; 5762 5763 BPF_CALL_5(bpf_unlocked_sock_setsockopt, struct sock *, sk, int, level, 5764 int, optname, char *, optval, int, optlen) 5765 { 5766 return _bpf_setsockopt(sk, level, optname, optval, optlen); 5767 } 5768 > 5769 const struct bpf_func_proto bpf_unlocked_sock_setsockopt_proto = { 5770 .func = bpf_unlocked_sock_setsockopt, 5771 .gpl_only = false, 5772 .ret_type = RET_INTEGER, 5773 .arg1_type = ARG_PTR_TO_CTX, 5774 .arg2_type = ARG_ANYTHING, 5775 .arg3_type = ARG_ANYTHING, 5776 .arg4_type = ARG_PTR_TO_MEM | MEM_RDONLY, 5777 .arg5_type = ARG_CONST_SIZE, 5778 }; 5779 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki