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: <CAEf4BzZCSd2Y8KrVMHPG8=pjaF_GfVZqt3Tu0jRkRP_gSDreSg@mail.gmail.com>
Date:   Fri, 4 Sep 2020 14:55:52 -0700
From:   Andrii Nakryiko <andrii.nakryiko@...il.com>
To:     Quentin Monnet <quentin@...valent.com>
Cc:     Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        bpf <bpf@...r.kernel.org>, Networking <netdev@...r.kernel.org>,
        Martynas Pumputis <m@...bda.lt>
Subject: Re: [PATCH bpf-next 2/2] tools: bpftool: add "inner_map" to "bpftool
 map create" outer maps

On Fri, Sep 4, 2020 at 9:16 AM Quentin Monnet <quentin@...valent.com> wrote:
>
> There is no support for creating maps of types array-of-map or
> hash-of-map in bpftool. This is because the kernel needs an inner_map_fd
> to collect metadata on the inner maps to be supported by the new map,
> but bpftool does not provide a way to pass this file descriptor.
>
> Add a new optional "inner_map" keyword that can be used to pass a
> reference to a map, retrieve a fd to that map, and pass it as the
> inner_map_fd.
>
> Add related documentation and bash completion. Note that we can
> reference the inner map by its name, meaning we can have several times
> the keyword "name" with different meanings (mandatory outer map name,
> and possibly a name to use to find the inner_map_fd). The bash
> completion will offer it just once, and will not suggest "name" on the
> following command:
>
>     # bpftool map create /sys/fs/bpf/my_outer_map type hash_of_maps \
>         inner_map name my_inner_map [TAB]
>
> Fixing that specific case seems too convoluted. Completion will work as
> expected, however, if the outer map name comes first and the "inner_map
> name ..." is passed second.
>
> Signed-off-by: Quentin Monnet <quentin@...valent.com>
> ---

Acked-by: Andrii Nakryiko <andriin@...com>

>  .../bpf/bpftool/Documentation/bpftool-map.rst | 10 +++-
>  tools/bpf/bpftool/bash-completion/bpftool     | 22 ++++++++-
>  tools/bpf/bpftool/map.c                       | 48 +++++++++++++------
>  3 files changed, 62 insertions(+), 18 deletions(-)
>

[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ