[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200408.144914.956216445223066424.davem@davemloft.net>
Date: Wed, 08 Apr 2020 14:49:14 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: brouer@...hat.com
Cc: sameehj@...zon.com, netdev@...r.kernel.org, bpf@...r.kernel.org,
zorik@...zon.com, akiyano@...zon.com, gtzalik@...zon.com,
toke@...hat.com, borkmann@...earbox.net,
alexei.starovoitov@...il.com, john.fastabend@...il.com,
alexander.duyck@...il.com, jeffrey.t.kirsher@...el.com,
dsahern@...il.com, willemdebruijn.kernel@...il.com,
ilias.apalodimas@...aro.org, lorenzo@...nel.org,
saeedm@...lanox.com
Subject: Re: [PATCH RFC v2 30/33] xdp: clear grow memory in
bpf_xdp_adjust_tail()
From: Jesper Dangaard Brouer <brouer@...hat.com>
Date: Wed, 08 Apr 2020 13:53:06 +0200
> @@ -3445,6 +3445,11 @@ BPF_CALL_2(bpf_xdp_adjust_tail, struct xdp_buff *, xdp, int, offset)
> if (unlikely(data_end < xdp->data + ETH_HLEN))
> return -EINVAL;
>
> + /* Clear memory area on grow, can contain uninit kernel memory */
> + if (offset > 0) {
> + memset(xdp->data_end, 0, offset);
> + }
Single statement basic blocks should elide curly braces.
Powered by blists - more mailing lists