Re: [PATCH bpf-next 3/6] bpf: Add link_info support for uprobe multi link

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

 



On Mon, Oct 30, 2023 at 10:18:59AM +0000, Quentin Monnet wrote:
> 
> 2023-10-25 21:24 UTC+0100 ~ Jiri Olsa
> > Adding support to get uprobe_link details through bpf_link_info
> > interface.
> > 
> > Adding new struct uprobe_multi to struct bpf_link_info to carry
> > the uprobe_multi link details.
> > 
> > The uprobe_multi.count is passed from user space to denote size
> > of array fields (offsets/ref_ctr_offsets/cookies). The actual
> > array size is stored back to uprobe_multi.count (allowing user
> > to find out the actual array size) and array fields are populated
> > up to the user passed size.
> > 
> > All the non-array fields (path/count/flags/pid) are always set.
> > 
> > Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
> > ---
> >  include/uapi/linux/bpf.h       | 10 +++++
> >  kernel/trace/bpf_trace.c       | 68 ++++++++++++++++++++++++++++++++++
> >  tools/include/uapi/linux/bpf.h | 10 +++++
> >  3 files changed, 88 insertions(+)
> > 
> > diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
> > index 0f6cdf52b1da..960cf2914d63 100644
> > --- a/include/uapi/linux/bpf.h
> > +++ b/include/uapi/linux/bpf.h
> > @@ -6556,6 +6556,16 @@ struct bpf_link_info {
> >  			__u32 flags;
> >  			__u64 missed;
> >  		} kprobe_multi;
> > +		struct {
> > +			__aligned_u64 path;
> > +			__aligned_u64 offsets;
> > +			__aligned_u64 ref_ctr_offsets;
> > +			__aligned_u64 cookies;
> > +			__u32 path_max; /* in/out: uprobe_multi path size */
> 
> Just a nit on the naming here: I don't really understand why this is
> "path_max", should it be "path_size" instead?

right, path_size fits better, will change

thanks,
jirka

> 
> Quentin




[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