Re: [PATCH bpf-next v2 4/4] selftest/bpf: The test cses of BPF cookie for fentry/fexit/fmod_ret.

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

 



On Fri, 2022-03-18 at 12:21 -0700, Alexei Starovoitov wrote:
> On Tue, Mar 15, 2022 at 05:42:31PM -0700, Kui-Feng Lee wrote:
> >  
> > +SEC("fentry/bpf_fentry_test1")
> 
> Did we discuss whether it makes sense to specify cookie in the SEC()
> ?
> 
> Probably no one will be using cookie when prog is attached to a
> specific
> function, but with support for poor man regex in SEC the cookie
> might be useful?
> Would we need a way to specify a set of cookies in SEC()?
> Or specify a set of pairs of kernel_func+cookie?
> None of it might be worth it.

It makes sense to me to provide a way to specify cookies in the source
code of a BPF program.
However, it could be a very complicated syntax and/or difficult to
read.
Kernel_func+cookie, even Kernel_func_pattern+cookie, pairs are easy to
understand.
For more complicated cases, giving cookies at user space programs would
be a better choice.





[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