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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEf4BzYNMtR56RRWDZEMK-nZj3AWoQJm-8-SL+vfhRT1nZjJhA@mail.gmail.com>
Date:   Mon, 22 Jun 2020 22:50:52 -0700
From:   Andrii Nakryiko <andrii.nakryiko@...il.com>
To:     Lorenzo Bianconi <lorenzo@...nel.org>
Cc:     bpf <bpf@...r.kernel.org>, Networking <netdev@...r.kernel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Alexei Starovoitov <ast@...nel.org>,
        Jesper Dangaard Brouer <brouer@...hat.com>,
        Daniel Borkmann <daniel@...earbox.net>,
        Toke Høiland-Jørgensen <toke@...hat.com>,
        lorenzo.bianconi@...hat.com, David Ahern <dsahern@...nel.org>
Subject: Re: [PATCH v2 bpf-next 6/8] libbpf: add SEC name for xdp programs
 attached to CPUMAP

On Fri, Jun 19, 2020 at 9:55 PM Lorenzo Bianconi <lorenzo@...nel.org> wrote:
>
> As for DEVMAP, support SEC("xdp_cpumap*") as a short cut for loading
> the program with type BPF_PROG_TYPE_XDP and expected attach type
> BPF_XDP_CPUMAP.
>
> Signed-off-by: Lorenzo Bianconi <lorenzo@...nel.org>
> ---
>  tools/lib/bpf/libbpf.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
> index 477c679ed945..0cd13cad8375 100644
> --- a/tools/lib/bpf/libbpf.c
> +++ b/tools/lib/bpf/libbpf.c
> @@ -6655,6 +6655,8 @@ static const struct bpf_sec_def section_defs[] = {
>                 .attach_fn = attach_iter),
>         BPF_EAPROG_SEC("xdp_devmap",            BPF_PROG_TYPE_XDP,
>                                                 BPF_XDP_DEVMAP),
> +       BPF_EAPROG_SEC("xdp_cpumap",            BPF_PROG_TYPE_XDP,
> +                                               BPF_XDP_CPUMAP),

I noticed that XDP and a bunch of other progs don't enforce "/" at the
end of the prog type prefix. Is there any reason for that? Tracing
prog types are pretty consistent about that (except for perf_event, I
think). I'd love it if we were trying to converge here. Do you mind
switching this to "xdp_cpumap/"? Would be nice to do the same for
xdp_devmap, if it's not too late yet.


>         BPF_PROG_SEC("xdp",                     BPF_PROG_TYPE_XDP),
>         BPF_PROG_SEC("perf_event",              BPF_PROG_TYPE_PERF_EVENT),
>         BPF_PROG_SEC("lwt_in",                  BPF_PROG_TYPE_LWT_IN),
> --
> 2.26.2
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ