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
| ||
|
Message-ID: <CAHA+R7MTJcsDpw=5P7hOsVf_pEOEZX_=cLrcw4ep4xntUxk=3Q@mail.gmail.com> Date: Mon, 25 Aug 2014 14:33:48 -0700 From: Cong Wang <cwang@...pensource.com> To: Alexei Starovoitov <ast@...mgrid.com> Cc: "David S. Miller" <davem@...emloft.net>, Ingo Molnar <mingo@...nel.org>, Linus Torvalds <torvalds@...ux-foundation.org>, Andy Lutomirski <luto@...capital.net>, Steven Rostedt <rostedt@...dmis.org>, Daniel Borkmann <dborkman@...hat.com>, Chema Gonzalez <chema@...gle.com>, Eric Dumazet <edumazet@...gle.com>, Peter Zijlstra <a.p.zijlstra@...llo.nl>, Brendan Gregg <brendan.d.gregg@...il.com>, Namhyung Kim <namhyung@...nel.org>, "H. Peter Anvin" <hpa@...or.com>, Andrew Morton <akpm@...ux-foundation.org>, Kees Cook <keescook@...omium.org>, linux-api@...r.kernel.org, netdev <netdev@...r.kernel.org>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org> Subject: Re: [PATCH v5 net-next 06/29] bpf: add lookup/update/delete/iterate methods to BPF maps On Sun, Aug 24, 2014 at 1:21 PM, Alexei Starovoitov <ast@...mgrid.com> wrote: > 'maps' is a generic storage of different types for sharing data between kernel > and userspace. > > The maps are accessed from user space via BPF syscall, which has commands: > > - create a map with given type and attributes > fd = bpf_map_create(map_type, struct nlattr *attr, int len) > returns fd or negative error > > - lookup key in a given map referenced by fd > err = bpf_map_lookup_elem(int fd, void *key, void *value) > returns zero and stores found elem into value or negative error > > - create or update key/value pair in a given map > err = bpf_map_update_elem(int fd, void *key, void *value) > returns zero or negative error > > - find and delete element by key in a given map > err = bpf_map_delete_elem(int fd, void *key) > > - iterate map elements (based on input key return next_key) > err = bpf_map_get_next_key(int fd, void *key, void *next_key) I think you need to document the bpf() syscall instead of wrappers on it, from a developer's point of view. You will anyway need to document a new syscall with a man page as a general rule. In the changelog I mean something like: err = bpf(BPF_MAP_LOOKUP_ELEM, ...); -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists