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: <9f6fefe5-0b9f-6257-4e84-19759dd72ab4@netronome.com>
Date:   Fri, 15 Mar 2019 19:41:35 +0000
From:   Quentin Monnet <quentin.monnet@...ronome.com>
To:     Jakub Kicinski <jakub.kicinski@...ronome.com>,
        Arnaldo Carvalho de Melo <acme@...hat.com>
Cc:     Daniel Borkmann <daniel@...earbox.net>,
        Alexei Starovoitov <ast@...nel.org>,
        Jiri Olsa <jolsa@...nel.org>, Martin KaFai Lau <kafai@...com>,
        Namhyung Kim <namhyung@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Song Liu <songliubraving@...com>,
        Stanislav Fomichev <sdf@...gle.com>,
        Yonghong Song <yhs@...com>, bpf@...r.kernel.org,
        netdev@...r.kernel.org
Subject: Re: [PATCH 1/1] bpftool: Allow referring to maps by its name

2019-03-15 12:16 UTC-0700 ~ Jakub Kicinski <jakub.kicinski@...ronome.com>
> On Fri, 15 Mar 2019 15:41:41 -0300, Arnaldo Carvalho de Melo wrote:
>> While developing 'perf trace' and looking at BPF maps it puts in place I
>> noticed that one needs to first use 'bpftool map' to lookup a map id to
>> then use 'bpftool map dump map id <map-id-looked-up>'.
>>
>> This is needed because everytime we restart 'perf trace' the map IDs
>> gets changed so we need to do the ID lookup again.
>>
>> To speed up this sequence, allow specifying just the map name, look up
>> its ID and then use the existing routines as if the user had provided
>> the map id.
> 
> I can see how it could be useful for quick debug.  Names are not
> guaranteed to be unique, though, do you not care about potential
> duplicates?
> 

Jakub beat me to it by a few seconds :). I discussed possible 
workarounds on that point with him though, so here are my two cents. I 
see two options: first one would be to return the ids of, and then dump 
info about all maps having that name. The second one would be to simply 
return an error if duplicate names are found.

We agreed that returning an error if there are duplicates is probably 
the best way to go, because dealing with several maps for anything else 
than "bpftool map show" would be problematic (clearly, we don't want to 
update all maps with a given name at once). Of course if you have other 
suggestions, feel free to propose :).

Best,
Quentin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ