tree:
https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/bpf.git pr/bpf-tc-misc
head: e9a9577c7e49d2e122576b4066f156d8c83556ef
commit: 72a4e02bd0f8299a3fae97459ffa3bd3cd1ba1c3 [3/4] bpf, poc: redirect into neigh
config: x86_64-randconfig-r034-20200820 (attached as .config)
compiler: clang version 12.0.0 (
https://github.com/llvm/llvm-project
b587ca93be114d07ec3bf654add97d7872325281)
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 72a4e02bd0f8299a3fae97459ffa3bd3cd1ba1c3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
> net/ipv4/ip_output.c:185:5: warning: no previous prototype for
function 'ip_finish_output2' [-Wmissing-prototypes]
int
ip_finish_output2(struct net *net, struct sock *sk, struct sk_buff *skb)
^
net/ipv4/ip_output.c:185:1: note: declare 'static' if the function is not
intended to be used outside of this translation unit
int ip_finish_output2(struct net *net, struct sock *sk, struct sk_buff *skb)
^
static
1 warning generated.
#
https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/bpf.git/commit/?...
git remote add dborkman
https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/bpf.git
git fetch --no-tags dborkman pr/bpf-tc-misc
git checkout 72a4e02bd0f8299a3fae97459ffa3bd3cd1ba1c3
vim +/ip_finish_output2 +185 net/ipv4/ip_output.c
184
185 int ip_finish_output2(struct net *net, struct sock *sk, struct
sk_buff *skb)
186 {
187 struct dst_entry *dst = skb_dst(skb);
188 struct rtable *rt = (struct rtable *)dst;
189 struct net_device *dev = dst->dev;
190 unsigned int hh_len = LL_RESERVED_SPACE(dev);
191 struct neighbour *neigh;
192 bool is_v6gw = false;
193
194 if (rt->rt_type == RTN_MULTICAST) {
195 IP_UPD_PO_STATS(net, IPSTATS_MIB_OUTMCAST, skb->len);
196 } else if (rt->rt_type == RTN_BROADCAST)
197 IP_UPD_PO_STATS(net, IPSTATS_MIB_OUTBCAST, skb->len);
198
199 /* Be paranoid, rather than too clever. */
200 if (unlikely(skb_headroom(skb) < hh_len && dev->header_ops)) {
201 struct sk_buff *skb2;
202
203 skb2 = skb_realloc_headroom(skb, LL_RESERVED_SPACE(dev));
204 if (!skb2) {
205 kfree_skb(skb);
206 return -ENOMEM;
207 }
208 if (skb->sk)
209 skb_set_owner_w(skb2, skb->sk);
210 consume_skb(skb);
211 skb = skb2;
212 }
213
214 if (lwtunnel_xmit_redirect(dst->lwtstate)) {
215 int res = lwtunnel_xmit(skb);
216
217 if (res < 0 || res == LWTUNNEL_XMIT_DONE)
218 return res;
219 }
220
221 rcu_read_lock_bh();
222 neigh = ip_neigh_for_gw(rt, skb, &is_v6gw);
223 if (!IS_ERR(neigh)) {
224 int res;
225
226 sock_confirm_neigh(skb, neigh);
227 /* if crossing protocols, can not use the cached header */
228 res = neigh_output(neigh, skb, is_v6gw);
229 rcu_read_unlock_bh();
230 return res;
231 }
232 rcu_read_unlock_bh();
233
234 net_dbg_ratelimited("%s: No header cache and no neighbour!\n",
235 __func__);
236 kfree_skb(skb);
237 return -EINVAL;
238 }
239
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org