Re: [PATCH v2 1/3] bpf: Allow NULL buffers in bpf_dynptr_slice(_rw)

From: Daniel Borkmann
Date: Wed Jul 19 2023 - 10:52:58 EST


On 7/19/23 1:21 AM, Jakub Kicinski wrote:
On Tue, 18 Jul 2023 16:17:24 -0700 Alexei Starovoitov wrote:
Which would encourage bnxt-like hacks.
I don't like it tbh.
At least skb_pointer_if_linear() has a clear meaning.
It's more run-time overhead, since buffer__opt is checked early,
but that's ok.

Alright, your version fine by me, too. Thanks!

Looks good to me too. Agree that the !buffer check should not live in
__skb_header_pointer() and is better handled in the bpf_dynptr_slice()
internals.

Thanks,
Daniel