Re: [PATCH bpf-next v3 2/3] bpftool: don't append / to the progtype

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

 



On Thu, Oct 21, 2021 at 3:21 AM Quentin Monnet <quentin@xxxxxxxxxxxxx> wrote:
>
> 2021-10-20 15:50 UTC-0700 ~ Stanislav Fomichev <sdf@xxxxxxxxxx>
> > Otherwise, attaching with bpftool doesn't work with strict section names.
> >
> > Also, switch to libbpf strict mode to use the latest conventions
> > (note, I don't think we have any cli api guarantees?).
>
> We've been trying to avoid breaking the command line arguments so far.
> With your patch, there are several types that would need a '/' appended
> to the command line argument. As far as I can tell, these are:
>
>     kprobe
>     kretprobe
>     uprobe
>     uretprobe
>     tracepoint
>     raw_tracepoint
>     tp
>     raw_tp
>     xdp_devmap
>     xdp_cpumap
>
> (Libbpf requires a '/' for a few other types, but bpftool does not
> support loading programs of such types at this time.)
>
> And I find it a bit strange to pass the trailing slash on the command line:
>
>     # bpftool prog load ret1.o /sys/fs/bpf/ret1 type kprobe/
>
> Would it be possible to maintain the current syntax? Maybe by keeping a
> list of types that need the trailing '/', or by making a second attempt
> with the '/' when libbpf complains that it failed to guess the program type?

Sounds good! I can leave existing code and add a retry without '/' to
enable strict mode.



[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