Re: [PATCH v14 bpf-next 00/18] mvneta: introduce XDP multi-buffer support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 17, 2021 at 11:33 AM Jakub Kicinski <kuba@xxxxxxxxxx> wrote:
>
> > >
> > > Alternatively how about we produce a variation on skb_header_pointer()
> > > (use on-stack buffer or direct access if the entire region is in one
> > > frag).
>
> If bpf_xdp_load_bytes() / bpf_xdp_store_bytes() works for most we
> can start with that. In all honesty I don't know what the exact
> use cases for looking at data are, either. I'm primarily worried
> about exposing the kernel internals too early.

I don't mind the xdp equivalent of skb_load_bytes,
but skb_header_pointer() idea is superior.
When we did xdp with data/data_end there was no refine_retval_range
concept in the verifier (iirc or we just missed that opportunity).
We'd need something more advanced: a pointer with valid range
refined by input argument 'len' or NULL.
The verifier doesn't have such thing yet, but it fits as a combination of
value_or_null plus refine_retval_range.
The bpf_xdp_header_pointer() and bpf_skb_header_pointer()
would probably simplify bpf programs as well.
There would be no need to deal with data/data_end.



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux