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
| ||
|
Date: Thu, 9 Apr 2020 23:11:37 -0700 From: Yonghong Song <yhs@...com> To: Alexei Starovoitov <alexei.starovoitov@...il.com> CC: Andrii Nakryiko <andriin@...com>, <bpf@...r.kernel.org>, Martin KaFai Lau <kafai@...com>, <netdev@...r.kernel.org>, Alexei Starovoitov <ast@...com>, Daniel Borkmann <daniel@...earbox.net>, <kernel-team@...com> Subject: Re: [RFC PATCH bpf-next 11/16] bpf: implement query for target_proto and file dumper prog_id On 4/9/20 8:10 PM, Alexei Starovoitov wrote: > On Wed, Apr 08, 2020 at 04:25:33PM -0700, Yonghong Song wrote: >> diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h >> index a245f0df53c4..fc2157e319f1 100644 >> --- a/tools/include/uapi/linux/bpf.h >> +++ b/tools/include/uapi/linux/bpf.h >> @@ -113,6 +113,7 @@ enum bpf_cmd { >> BPF_MAP_DELETE_BATCH, >> BPF_LINK_CREATE, >> BPF_LINK_UPDATE, >> + BPF_DUMP_QUERY, >> }; >> >> enum bpf_map_type { >> @@ -594,6 +595,18 @@ union bpf_attr { >> __u32 old_prog_fd; >> } link_update; >> >> + struct { >> + __u32 query_fd; >> + __u32 flags; >> + union { >> + struct { >> + __aligned_u64 target_proto; >> + __u32 proto_buf_len; >> + }; >> + __u32 prog_id; >> + }; >> + } dump_query; > > I think it would be cleaner to use BPF_OBJ_GET_INFO_BY_FD instead of > introducing new command. Right, using BPF_OBJ_GET_INFO_BY_FD should be good. Previously, I am using target/dumper name to query and later I changed to fd, but still used BPF_DUMP_QUERY...
Powered by blists - more mailing lists