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]
Date:   Tue, 16 Jan 2018 02:52:51 +0100
From:   Daniel Borkmann <daniel@...earbox.net>
To:     Roman Gushchin <guro@...com>,
        Quentin Monnet <quentin.monnet@...ronome.com>
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        kernel-team@...com, Jakub Kicinski <jakub.kicinski@...ronome.com>,
        Alexei Starovoitov <ast@...nel.org>
Subject: Re: [PATCH bpf-next] bpftool: recognize BPF_PROG_TYPE_CGROUP_DEVICE
 programs

On 01/15/2018 08:49 PM, Roman Gushchin wrote:
> On Mon, Jan 15, 2018 at 07:32:01PM +0000, Quentin Monnet wrote:
>> 2018-01-15 19:16 UTC+0000 ~ Roman Gushchin <guro@...com>
>>> Bpftool doesn't recognize BPF_PROG_TYPE_CGROUP_DEVICE programs,
>>> so the prog show command prints the numeric type value:
>>>
>>> $ bpftool prog show
>>> 1: type 15  name bpf_prog1  tag ac9f93dbfd6d9b74
>>> 	loaded_at Jan 15/07:58  uid 0
>>> 	xlated 96B  jited 105B  memlock 4096B
>>>
>>> This patch defines the corresponding textual representation:
>>>
>>> $ bpftool prog show
>>> 1: cgroup_device  name bpf_prog1  tag ac9f93dbfd6d9b74
>>> 	loaded_at Jan 15/07:58  uid 0
>>> 	xlated 96B  jited 105B  memlock 4096B
>>>
>>> Signed-off-by: Roman Gushchin <guro@...com>
>>> Cc: Jakub Kicinski <jakub.kicinski@...ronome.com>
>>> Cc: Quentin Monnet <quentin.monnet@...ronome.com>
>>> Cc: Daniel Borkmann <daniel@...earbox.net>
>>> Cc: Alexei Starovoitov <ast@...nel.org>
>>> ---
>>>  tools/bpf/bpftool/prog.c | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c
>>> index c6a28be4665c..099e21cf1b5c 100644
>>> --- a/tools/bpf/bpftool/prog.c
>>> +++ b/tools/bpf/bpftool/prog.c
>>> @@ -66,6 +66,7 @@ static const char * const prog_type_name[] = {
>>>  	[BPF_PROG_TYPE_LWT_XMIT]	= "lwt_xmit",
>>>  	[BPF_PROG_TYPE_SOCK_OPS]	= "sock_ops",
>>>  	[BPF_PROG_TYPE_SK_SKB]		= "sk_skb",
>>> +	[BPF_PROG_TYPE_CGROUP_DEVICE]	= "cgroup_device",
>>>  };
>>>  
>>>  static void print_boot_time(__u64 nsecs, char *buf, unsigned int size)
>>
>> Looks good, thanks Roman!
>> Would you mind updating the map names as well? It seems the
>> BPF_MAP_TYPE_CPUMAP is missing from the list in map.c.
> 
> Hello, Quentin!
> 
> Sure, I'll take a look.

Ok, I presume this comes in as a separate one anyway, so I've applied
this one into bpf-next already, thanks Roman!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ