[External] : Re: [PATCH] net/tap: Modified TAP BPF program as per the new Kernel-version upgrade requirements.
    Stephen Hemminger 
    stephen at networkplumber.org
       
    Fri Jan  5 18:39:34 CET 2024
    
    
  
On Fri, 5 Jan 2024 14:44:00 +0000
Madhuker Mythri <madhuker.mythri at oracle.com> wrote:
> Hi Stephen,
> 
> The BPF helper man pages implies in that way and the SKB data pointer access was working till 5.4 kernel also, however from Kernel-5.15 version, we do see eBPF verifier throws error when we use SKB data pointer access.
> So, I had used this helper functions and able to resolve the errors. This is helper functions are safe to use and also protects from any non-linear skb data buffer access also.
> 
> So, I think using helper functions is better and safe way to access the SKB data, instead of pointer access.
> 
> Thanks,
> Madhuker.
Using the accessors may mean it won't work with older kernels, but that is not
a huge concern given how fragile this code is.
    
    
More information about the dev
mailing list