From: kernel test robot <lkp@intel.com>
To: Jason Xing <kerneljasonxing@gmail.com>,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, dsahern@kernel.org,
willemdebruijn.kernel@gmail.com, willemb@google.com,
ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
martin.lau@linux.dev, eddyz87@gmail.com, song@kernel.org,
yonghong.song@linux.dev, john.fastabend@gmail.com,
kpsingh@kernel.org, sdf@fomichev.me, haoluo@google.com,
jolsa@kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
bpf@vger.kernel.org, netdev@vger.kernel.org,
Jason Xing <kernelxing@tencent.com>
Subject: Re: [PATCH net-next v4 01/11] net-timestamp: add support for bpf_setsockopt()
Date: Mon, 9 Dec 2024 12:31:52 +0800 [thread overview]
Message-ID: <202412080629.IyOW2oUA-lkp@intel.com> (raw)
In-Reply-To: <20241207173803.90744-2-kerneljasonxing@gmail.com>
Hi Jason,
kernel test robot noticed the following build errors:
[auto build test ERROR on net-next/main]
url: https://github.com/intel-lab-lkp/linux/commits/Jason-Xing/net-timestamp-add-support-for-bpf_setsockopt/20241208-014111
base: net-next/main
patch link: https://lore.kernel.org/r/20241207173803.90744-2-kerneljasonxing%40gmail.com
patch subject: [PATCH net-next v4 01/11] net-timestamp: add support for bpf_setsockopt()
config: x86_64-buildonly-randconfig-004-20241208 (https://download.01.org/0day-ci/archive/20241208/202412080629.IyOW2oUA-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241208/202412080629.IyOW2oUA-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412080629.IyOW2oUA-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from net/core/filter.c:21:
In file included from include/linux/bpf_verifier.h:7:
In file included from include/linux/bpf.h:21:
In file included from include/linux/kallsyms.h:13:
In file included from include/linux/mm.h:2223:
include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
net/core/filter.c:1726:30: warning: bitwise operation between different enumeration types ('enum bpf_arg_type' and 'enum bpf_type_flag') [-Wenum-enum-conversion]
1726 | .arg3_type = ARG_PTR_TO_MEM | MEM_RDONLY,
| ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~
net/core/filter.c:2041:30: warning: bitwise operation between different enumeration types ('enum bpf_arg_type' and 'enum bpf_type_flag') [-Wenum-enum-conversion]
2041 | .arg1_type = ARG_PTR_TO_MEM | PTR_MAYBE_NULL | MEM_RDONLY,
| ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
net/core/filter.c:2043:30: warning: bitwise operation between different enumeration types ('enum bpf_arg_type' and 'enum bpf_type_flag') [-Wenum-enum-conversion]
2043 | .arg3_type = ARG_PTR_TO_MEM | PTR_MAYBE_NULL | MEM_RDONLY,
| ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
net/core/filter.c:2580:35: warning: bitwise operation between different enumeration types ('enum bpf_arg_type' and 'enum bpf_type_flag') [-Wenum-enum-conversion]
2580 | .arg2_type = ARG_PTR_TO_MEM | PTR_MAYBE_NULL | MEM_RDONLY,
| ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
net/core/filter.c:4643:30: warning: bitwise operation between different enumeration types ('enum bpf_arg_type' and 'enum bpf_type_flag') [-Wenum-enum-conversion]
4643 | .arg4_type = ARG_PTR_TO_MEM | MEM_RDONLY,
| ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~
net/core/filter.c:4657:30: warning: bitwise operation between different enumeration types ('enum bpf_arg_type' and 'enum bpf_type_flag') [-Wenum-enum-conversion]
4657 | .arg4_type = ARG_PTR_TO_MEM | MEM_RDONLY,
| ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~
net/core/filter.c:4857:30: warning: bitwise operation between different enumeration types ('enum bpf_arg_type' and 'enum bpf_type_flag') [-Wenum-enum-conversion]
4857 | .arg2_type = ARG_PTR_TO_MEM | MEM_RDONLY,
| ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~
net/core/filter.c:4885:30: warning: bitwise operation between different enumeration types ('enum bpf_arg_type' and 'enum bpf_type_flag') [-Wenum-enum-conversion]
4885 | .arg2_type = ARG_PTR_TO_MEM | MEM_RDONLY,
| ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~
net/core/filter.c:5057:30: warning: bitwise operation between different enumeration types ('enum bpf_arg_type' and 'enum bpf_type_flag') [-Wenum-enum-conversion]
5057 | .arg4_type = ARG_PTR_TO_MEM | MEM_RDONLY,
| ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~
net/core/filter.c:5071:30: warning: bitwise operation between different enumeration types ('enum bpf_arg_type' and 'enum bpf_type_flag') [-Wenum-enum-conversion]
5071 | .arg4_type = ARG_PTR_TO_MEM | MEM_RDONLY,
| ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~
net/core/filter.c:5120:45: warning: bitwise operation between different enumeration types ('enum bpf_arg_type' and 'enum bpf_type_flag') [-Wenum-enum-conversion]
5120 | .arg1_type = ARG_PTR_TO_BTF_ID_SOCK_COMMON | PTR_MAYBE_NULL,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
>> net/core/filter.c:5232:6: error: no member named 'sk_bpf_cb_flags' in 'struct sock'
5232 | sk->sk_bpf_cb_flags = sk_bpf_cb_flags;
| ~~ ^
net/core/filter.c:5577:30: warning: bitwise operation between different enumeration types ('enum bpf_arg_type' and 'enum bpf_type_flag') [-Wenum-enum-conversion]
5577 | .arg4_type = ARG_PTR_TO_MEM | MEM_RDONLY,
| ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~
net/core/filter.c:5611:30: warning: bitwise operation between different enumeration types ('enum bpf_arg_type' and 'enum bpf_type_flag') [-Wenum-enum-conversion]
5611 | .arg4_type = ARG_PTR_TO_MEM | MEM_RDONLY,
| ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~
net/core/filter.c:5645:30: warning: bitwise operation between different enumeration types ('enum bpf_arg_type' and 'enum bpf_type_flag') [-Wenum-enum-conversion]
5645 | .arg4_type = ARG_PTR_TO_MEM | MEM_RDONLY,
| ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~
net/core/filter.c:5679:30: warning: bitwise operation between different enumeration types ('enum bpf_arg_type' and 'enum bpf_type_flag') [-Wenum-enum-conversion]
5679 | .arg4_type = ARG_PTR_TO_MEM | MEM_RDONLY,
| ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~
net/core/filter.c:5854:30: warning: bitwise operation between different enumeration types ('enum bpf_arg_type' and 'enum bpf_type_flag') [-Wenum-enum-conversion]
5854 | .arg2_type = ARG_PTR_TO_MEM | MEM_RDONLY,
| ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~
net/core/filter.c:6391:46: warning: bitwise operation between different enumeration types ('enum bpf_arg_type' and 'enum bpf_type_flag') [-Wenum-enum-conversion]
6391 | .arg3_type = ARG_PTR_TO_FIXED_SIZE_MEM | MEM_WRITE | MEM_ALIGNED,
| ~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~
net/core/filter.c:6403:46: warning: bitwise operation between different enumeration types ('enum bpf_arg_type' and 'enum bpf_type_flag') [-Wenum-enum-conversion]
6403 | .arg3_type = ARG_PTR_TO_FIXED_SIZE_MEM | MEM_WRITE | MEM_ALIGNED,
| ~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~
net/core/filter.c:6489:30: warning: bitwise operation between different enumeration types ('enum bpf_arg_type' and 'enum bpf_type_flag') [-Wenum-enum-conversion]
6489 | .arg3_type = ARG_PTR_TO_MEM | MEM_RDONLY,
| ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~
net/core/filter.c:6499:30: warning: bitwise operation between different enumeration types ('enum bpf_arg_type' and 'enum bpf_type_flag') [-Wenum-enum-conversion]
6499 | .arg3_type = ARG_PTR_TO_MEM | MEM_RDONLY,
| ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~
21 warnings and 1 error generated.
vim +5232 net/core/filter.c
5049
5050 static const struct bpf_func_proto bpf_xdp_event_output_proto = {
5051 .func = bpf_xdp_event_output,
5052 .gpl_only = true,
5053 .ret_type = RET_INTEGER,
5054 .arg1_type = ARG_PTR_TO_CTX,
5055 .arg2_type = ARG_CONST_MAP_PTR,
5056 .arg3_type = ARG_ANYTHING,
> 5057 .arg4_type = ARG_PTR_TO_MEM | MEM_RDONLY,
5058 .arg5_type = ARG_CONST_SIZE_OR_ZERO,
5059 };
5060
5061 BTF_ID_LIST_SINGLE(bpf_xdp_output_btf_ids, struct, xdp_buff)
5062
5063 const struct bpf_func_proto bpf_xdp_output_proto = {
5064 .func = bpf_xdp_event_output,
5065 .gpl_only = true,
5066 .ret_type = RET_INTEGER,
5067 .arg1_type = ARG_PTR_TO_BTF_ID,
5068 .arg1_btf_id = &bpf_xdp_output_btf_ids[0],
5069 .arg2_type = ARG_CONST_MAP_PTR,
5070 .arg3_type = ARG_ANYTHING,
5071 .arg4_type = ARG_PTR_TO_MEM | MEM_RDONLY,
5072 .arg5_type = ARG_CONST_SIZE_OR_ZERO,
5073 };
5074
5075 BPF_CALL_1(bpf_get_socket_cookie, struct sk_buff *, skb)
5076 {
5077 return skb->sk ? __sock_gen_cookie(skb->sk) : 0;
5078 }
5079
5080 static const struct bpf_func_proto bpf_get_socket_cookie_proto = {
5081 .func = bpf_get_socket_cookie,
5082 .gpl_only = false,
5083 .ret_type = RET_INTEGER,
5084 .arg1_type = ARG_PTR_TO_CTX,
5085 };
5086
5087 BPF_CALL_1(bpf_get_socket_cookie_sock_addr, struct bpf_sock_addr_kern *, ctx)
5088 {
5089 return __sock_gen_cookie(ctx->sk);
5090 }
5091
5092 static const struct bpf_func_proto bpf_get_socket_cookie_sock_addr_proto = {
5093 .func = bpf_get_socket_cookie_sock_addr,
5094 .gpl_only = false,
5095 .ret_type = RET_INTEGER,
5096 .arg1_type = ARG_PTR_TO_CTX,
5097 };
5098
5099 BPF_CALL_1(bpf_get_socket_cookie_sock, struct sock *, ctx)
5100 {
5101 return __sock_gen_cookie(ctx);
5102 }
5103
5104 static const struct bpf_func_proto bpf_get_socket_cookie_sock_proto = {
5105 .func = bpf_get_socket_cookie_sock,
5106 .gpl_only = false,
5107 .ret_type = RET_INTEGER,
5108 .arg1_type = ARG_PTR_TO_CTX,
5109 };
5110
5111 BPF_CALL_1(bpf_get_socket_ptr_cookie, struct sock *, sk)
5112 {
5113 return sk ? sock_gen_cookie(sk) : 0;
5114 }
5115
5116 const struct bpf_func_proto bpf_get_socket_ptr_cookie_proto = {
5117 .func = bpf_get_socket_ptr_cookie,
5118 .gpl_only = false,
5119 .ret_type = RET_INTEGER,
5120 .arg1_type = ARG_PTR_TO_BTF_ID_SOCK_COMMON | PTR_MAYBE_NULL,
5121 };
5122
5123 BPF_CALL_1(bpf_get_socket_cookie_sock_ops, struct bpf_sock_ops_kern *, ctx)
5124 {
5125 return __sock_gen_cookie(ctx->sk);
5126 }
5127
5128 static const struct bpf_func_proto bpf_get_socket_cookie_sock_ops_proto = {
5129 .func = bpf_get_socket_cookie_sock_ops,
5130 .gpl_only = false,
5131 .ret_type = RET_INTEGER,
5132 .arg1_type = ARG_PTR_TO_CTX,
5133 };
5134
5135 static u64 __bpf_get_netns_cookie(struct sock *sk)
5136 {
5137 const struct net *net = sk ? sock_net(sk) : &init_net;
5138
5139 return net->net_cookie;
5140 }
5141
5142 BPF_CALL_1(bpf_get_netns_cookie, struct sk_buff *, skb)
5143 {
5144 return __bpf_get_netns_cookie(skb && skb->sk ? skb->sk : NULL);
5145 }
5146
5147 static const struct bpf_func_proto bpf_get_netns_cookie_proto = {
5148 .func = bpf_get_netns_cookie,
5149 .ret_type = RET_INTEGER,
5150 .arg1_type = ARG_PTR_TO_CTX_OR_NULL,
5151 };
5152
5153 BPF_CALL_1(bpf_get_netns_cookie_sock, struct sock *, ctx)
5154 {
5155 return __bpf_get_netns_cookie(ctx);
5156 }
5157
5158 static const struct bpf_func_proto bpf_get_netns_cookie_sock_proto = {
5159 .func = bpf_get_netns_cookie_sock,
5160 .gpl_only = false,
5161 .ret_type = RET_INTEGER,
5162 .arg1_type = ARG_PTR_TO_CTX_OR_NULL,
5163 };
5164
5165 BPF_CALL_1(bpf_get_netns_cookie_sock_addr, struct bpf_sock_addr_kern *, ctx)
5166 {
5167 return __bpf_get_netns_cookie(ctx ? ctx->sk : NULL);
5168 }
5169
5170 static const struct bpf_func_proto bpf_get_netns_cookie_sock_addr_proto = {
5171 .func = bpf_get_netns_cookie_sock_addr,
5172 .gpl_only = false,
5173 .ret_type = RET_INTEGER,
5174 .arg1_type = ARG_PTR_TO_CTX_OR_NULL,
5175 };
5176
5177 BPF_CALL_1(bpf_get_netns_cookie_sock_ops, struct bpf_sock_ops_kern *, ctx)
5178 {
5179 return __bpf_get_netns_cookie(ctx ? ctx->sk : NULL);
5180 }
5181
5182 static const struct bpf_func_proto bpf_get_netns_cookie_sock_ops_proto = {
5183 .func = bpf_get_netns_cookie_sock_ops,
5184 .gpl_only = false,
5185 .ret_type = RET_INTEGER,
5186 .arg1_type = ARG_PTR_TO_CTX_OR_NULL,
5187 };
5188
5189 BPF_CALL_1(bpf_get_netns_cookie_sk_msg, struct sk_msg *, ctx)
5190 {
5191 return __bpf_get_netns_cookie(ctx ? ctx->sk : NULL);
5192 }
5193
5194 static const struct bpf_func_proto bpf_get_netns_cookie_sk_msg_proto = {
5195 .func = bpf_get_netns_cookie_sk_msg,
5196 .gpl_only = false,
5197 .ret_type = RET_INTEGER,
5198 .arg1_type = ARG_PTR_TO_CTX_OR_NULL,
5199 };
5200
5201 BPF_CALL_1(bpf_get_socket_uid, struct sk_buff *, skb)
5202 {
5203 struct sock *sk = sk_to_full_sk(skb->sk);
5204 kuid_t kuid;
5205
5206 if (!sk || !sk_fullsock(sk))
5207 return overflowuid;
5208 kuid = sock_net_uid(sock_net(sk), sk);
5209 return from_kuid_munged(sock_net(sk)->user_ns, kuid);
5210 }
5211
5212 static const struct bpf_func_proto bpf_get_socket_uid_proto = {
5213 .func = bpf_get_socket_uid,
5214 .gpl_only = false,
5215 .ret_type = RET_INTEGER,
5216 .arg1_type = ARG_PTR_TO_CTX,
5217 };
5218
5219 static int sk_bpf_set_cb_flags(struct sock *sk, sockptr_t optval, bool getopt)
5220 {
5221 int sk_bpf_cb_flags;
5222
5223 if (getopt)
5224 return -EINVAL;
5225
5226 if (copy_from_sockptr(&sk_bpf_cb_flags, optval, sizeof(sk_bpf_cb_flags)))
5227 return -EFAULT;
5228
5229 if (sk_bpf_cb_flags & ~SK_BPF_CB_MASK)
5230 return -EINVAL;
5231
> 5232 sk->sk_bpf_cb_flags = sk_bpf_cb_flags;
5233
5234 return 0;
5235 }
5236
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-12-09 4:32 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-07 17:37 [PATCH net-next v4 00/11] net-timestamp: bpf extension to equip applications transparently Jason Xing
2024-12-07 17:37 ` [PATCH net-next v4 01/11] net-timestamp: add support for bpf_setsockopt() Jason Xing
2024-12-09 4:28 ` kernel test robot
2024-12-09 4:31 ` kernel test robot [this message]
2024-12-12 19:34 ` Martin KaFai Lau
2024-12-13 14:12 ` Jason Xing
2024-12-07 17:37 ` [PATCH net-next v4 02/11] net-timestamp: prepare for bpf prog use Jason Xing
2024-12-11 2:02 ` Martin KaFai Lau
2024-12-11 9:17 ` Jason Xing
2024-12-13 1:41 ` Martin KaFai Lau
2024-12-13 14:42 ` Jason Xing
2024-12-13 22:26 ` Martin KaFai Lau
2024-12-13 23:56 ` Jason Xing
2024-12-07 17:37 ` [PATCH net-next v4 03/11] net-timestamp: reorganize in skb_tstamp_tx_output() Jason Xing
2024-12-09 14:37 ` Willem de Bruijn
2024-12-09 14:57 ` Jason Xing
2024-12-07 17:37 ` [PATCH net-next v4 04/11] net-timestamp: support SCM_TSTAMP_SCHED for bpf extension Jason Xing
2024-12-07 17:37 ` [PATCH net-next v4 05/11] net-timestamp: support SCM_TSTAMP_SND " Jason Xing
2024-12-07 17:37 ` [PATCH net-next v4 06/11] net-timestamp: support SCM_TSTAMP_ACK " Jason Xing
2024-12-12 22:36 ` Martin KaFai Lau
2024-12-13 14:49 ` Jason Xing
2024-12-13 22:46 ` Martin KaFai Lau
2024-12-07 17:37 ` [PATCH net-next v4 07/11] net-timestamp: support hwtstamp print " Jason Xing
2024-12-12 23:25 ` Martin KaFai Lau
2024-12-13 6:28 ` Martin KaFai Lau
2024-12-13 15:13 ` Jason Xing
2024-12-13 23:15 ` Martin KaFai Lau
2024-12-14 0:02 ` Jason Xing
2024-12-14 0:17 ` Martin KaFai Lau
2024-12-14 0:48 ` Jason Xing
2024-12-07 17:38 ` [PATCH net-next v4 08/11] net-timestamp: make TCP tx timestamp bpf extension work Jason Xing
2024-12-07 17:38 ` [PATCH net-next v4 09/11] net-timestamp: introduce cgroup lock to avoid affecting non-bpf cases Jason Xing
2024-12-07 17:38 ` [PATCH net-next v4 10/11] net-timestamp: export the tskey for TCP bpf extension Jason Xing
2024-12-13 0:28 ` Martin KaFai Lau
2024-12-13 15:44 ` Jason Xing
2024-12-13 23:55 ` Martin KaFai Lau
2024-12-14 0:09 ` Jason Xing
2025-01-08 4:21 ` Jason Xing
2025-01-08 12:55 ` Jason Xing
2025-01-10 20:35 ` Martin KaFai Lau
2025-01-10 22:46 ` Jason Xing
2024-12-07 17:38 ` [PATCH net-next v4 11/11] bpf: add simple bpf tests in the tx path for so_timstamping feature Jason Xing
2024-12-09 14:45 ` Willem de Bruijn
2024-12-09 14:58 ` Jason Xing
2024-12-13 1:14 ` Martin KaFai Lau
2024-12-13 16:02 ` Jason Xing
2024-12-14 0:14 ` Martin KaFai Lau
2024-12-14 0:45 ` Jason Xing
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=202412080629.IyOW2oUA-lkp@intel.com \
--to=lkp@intel.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=eddyz87@gmail.com \
--cc=edumazet@google.com \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kerneljasonxing@gmail.com \
--cc=kernelxing@tencent.com \
--cc=kpsingh@kernel.org \
--cc=kuba@kernel.org \
--cc=llvm@lists.linux.dev \
--cc=martin.lau@linux.dev \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pabeni@redhat.com \
--cc=sdf@fomichev.me \
--cc=song@kernel.org \
--cc=willemb@google.com \
--cc=willemdebruijn.kernel@gmail.com \
--cc=yonghong.song@linux.dev \
/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