lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 21 Oct 2021 09:36:01 -0700
From:   Stanislav Fomichev <sdf@...gle.com>
To:     Quentin Monnet <quentin@...valent.com>
Cc:     netdev@...r.kernel.org, bpf@...r.kernel.org, ast@...nel.org,
        daniel@...earbox.net, andrii@...nel.org
Subject: Re: [PATCH bpf-next v3 2/3] bpftool: don't append / to the progtype

On Thu, Oct 21, 2021 at 3:21 AM Quentin Monnet <quentin@...valent.com> wrote:
>
> 2021-10-20 15:50 UTC-0700 ~ Stanislav Fomichev <sdf@...gle.com>
> > 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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ