Re: [PATCH bpf-next 1/2] bpf: add bpf_dynptr_memset() kfunc

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

 




On 6/19/25 18:19, Eduard Zingerman wrote:
On Thu, 2025-06-19 at 10:09 -0700, Ihor Solodrai wrote:

[...]

But then, does memset even make sense for xdp/skb buffers?
Why not?

Maybe -ENOTSUPP is more appropriate?

I'd appreciate any hints.
I think Mykyta has kernel/trace/bpf_trace.c:__bpf_dynptr_copy_str() in mind.

Right, similarly to `__bpf_dynptr_copy` from bpf_trace.c: fast path if destination has enough contiguous memory,
just call memset.
Slow path - use temp buffer, that you can memset once and then __bpf_dynptr_write it in a loop. __bpf_dynptr_write
handles the trickiness of the non-contiguous buffers.





[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