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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 21 Oct 2021 11:21:51 +0100
From:   Quentin Monnet <quentin@...valent.com>
To:     Stanislav Fomichev <sdf@...gle.com>, netdev@...r.kernel.org,
        bpf@...r.kernel.org
Cc:     ast@...nel.org, daniel@...earbox.net, andrii@...nel.org
Subject: Re: [PATCH bpf-next v3 2/3] bpftool: don't append / to the progtype

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?

Quentin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ