From: Alexei Starovoitov <ast-uqk4Ao+rVK5Wk0Htik3J/w@public.gmane.org>
To: "David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Cc: Ingo Molnar <mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Linus Torvalds
<torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
Andy Lutomirski <luto-kltTT9wpgjJwATOyAt5JVQ@public.gmane.org>,
Steven Rostedt <rostedt-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org>,
Daniel Borkmann
<dborkman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
Chema Gonzalez <chema-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
Eric Dumazet <edumazet-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
Peter Zijlstra
<a.p.zijlstra-/NLkJaSkS4VmR6Xm/wNWPw@public.gmane.org>,
Arnaldo Carvalho de Melo
<acme-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
Jiri Olsa <jolsa-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
"H. Peter Anvin" <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>,
Andrew Morton
<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
Kees Cook <keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH RFC v2 net-next 06/16] bpf: enable bpf syscall on x64
Date: Thu, 17 Jul 2014 21:19:56 -0700 [thread overview]
Message-ID: <1405657206-12060-7-git-send-email-ast@plumgrid.com> (raw)
In-Reply-To: <1405657206-12060-1-git-send-email-ast-uqk4Ao+rVK5Wk0Htik3J/w@public.gmane.org>
done as separate commit to ease conflict resolution
Signed-off-by: Alexei Starovoitov <ast-uqk4Ao+rVK5Wk0Htik3J/w@public.gmane.org>
---
arch/x86/syscalls/syscall_64.tbl | 1 +
include/linux/syscalls.h | 2 ++
include/uapi/asm-generic/unistd.h | 4 +++-
kernel/sys_ni.c | 3 +++
4 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/arch/x86/syscalls/syscall_64.tbl b/arch/x86/syscalls/syscall_64.tbl
index ec255a1646d2..edbb8460e1b5 100644
--- a/arch/x86/syscalls/syscall_64.tbl
+++ b/arch/x86/syscalls/syscall_64.tbl
@@ -323,6 +323,7 @@
314 common sched_setattr sys_sched_setattr
315 common sched_getattr sys_sched_getattr
316 common renameat2 sys_renameat2
+317 common bpf sys_bpf
#
# x32-specific system call numbers start at 512 to avoid cache impact
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index b0881a0ed322..2b524aeba262 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -866,4 +866,6 @@ asmlinkage long sys_process_vm_writev(pid_t pid,
asmlinkage long sys_kcmp(pid_t pid1, pid_t pid2, int type,
unsigned long idx1, unsigned long idx2);
asmlinkage long sys_finit_module(int fd, const char __user *uargs, int flags);
+asmlinkage long sys_bpf(int cmd, unsigned long arg2, unsigned long arg3,
+ unsigned long arg4, unsigned long arg5);
#endif
diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h
index 333640608087..41e20f8fb87e 100644
--- a/include/uapi/asm-generic/unistd.h
+++ b/include/uapi/asm-generic/unistd.h
@@ -699,9 +699,11 @@ __SYSCALL(__NR_sched_setattr, sys_sched_setattr)
__SYSCALL(__NR_sched_getattr, sys_sched_getattr)
#define __NR_renameat2 276
__SYSCALL(__NR_renameat2, sys_renameat2)
+#define __NR_bpf 277
+__SYSCALL(__NR_bpf, sys_bpf)
#undef __NR_syscalls
-#define __NR_syscalls 277
+#define __NR_syscalls 278
/*
* All syscalls below here should go away really,
diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c
index 36441b51b5df..877c9aafbfb4 100644
--- a/kernel/sys_ni.c
+++ b/kernel/sys_ni.c
@@ -213,3 +213,6 @@ cond_syscall(compat_sys_open_by_handle_at);
/* compare kernel pointers */
cond_syscall(sys_kcmp);
+
+/* access BPF programs and maps */
+cond_syscall(sys_bpf);
--
1.7.9.5
next prev parent reply other threads:[~2014-07-18 4:19 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-18 4:19 [PATCH RFC v2 net-next 00/16] BPF syscall, maps, verifier, samples Alexei Starovoitov
[not found] ` <1405657206-12060-1-git-send-email-ast-uqk4Ao+rVK5Wk0Htik3J/w@public.gmane.org>
2014-07-18 4:19 ` [PATCH RFC v2 net-next 01/16] net: filter: split filter.c into two files Alexei Starovoitov
2014-07-18 4:19 ` [PATCH RFC v2 net-next 02/16] bpf: update MAINTAINERS entry Alexei Starovoitov
2014-07-23 17:37 ` Kees Cook
[not found] ` <CAGXu5j+mGDEPx5rCdVXzAdxR9SwQQ4ERM-Brxt4TmmncdPjzzg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-23 17:48 ` Alexei Starovoitov
[not found] ` <CAMEtUuzcMcYnRryykqb9LQWjnVmYi3ErMtGQ+9nyY5uS+OpwpQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-23 18:39 ` Kees Cook
2014-07-18 4:19 ` Alexei Starovoitov [this message]
2014-07-18 4:19 ` [PATCH RFC v2 net-next 03/16] net: filter: rename struct sock_filter_int into bpf_insn Alexei Starovoitov
2014-07-18 4:19 ` [PATCH RFC v2 net-next 04/16] net: filter: split filter.h and expose eBPF to user space Alexei Starovoitov
2014-07-18 4:19 ` [PATCH RFC v2 net-next 05/16] bpf: introduce syscall(BPF, ...) and BPF maps Alexei Starovoitov
[not found] ` <1405657206-12060-6-git-send-email-ast-uqk4Ao+rVK5Wk0Htik3J/w@public.gmane.org>
2014-07-23 18:02 ` Kees Cook
2014-07-23 19:30 ` Alexei Starovoitov
2014-07-18 4:19 ` [PATCH RFC v2 net-next 07/16] bpf: add lookup/update/delete/iterate methods to " Alexei Starovoitov
2014-07-23 18:25 ` Kees Cook
2014-07-23 19:49 ` Alexei Starovoitov
2014-07-23 20:25 ` Kees Cook
2014-07-23 21:22 ` Alexei Starovoitov
2014-07-18 4:19 ` [PATCH RFC v2 net-next 08/16] bpf: add hashtable type of " Alexei Starovoitov
[not found] ` <1405657206-12060-9-git-send-email-ast-uqk4Ao+rVK5Wk0Htik3J/w@public.gmane.org>
2014-07-23 18:36 ` Kees Cook
[not found] ` <CAGXu5jK1hrwvPs7f+mSOer+81J9SBxwMrqb=6fFeZQ7hd-FMzA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-23 19:57 ` Alexei Starovoitov
[not found] ` <CAMEtUuyRUG6ZdRvL0JuakD0zPdYo3WoqQepK7_b_MW+r2aVzVA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-23 20:33 ` Kees Cook
2014-07-23 21:42 ` Alexei Starovoitov
2014-07-18 4:19 ` [PATCH RFC v2 net-next 09/16] bpf: expand BPF syscall with program load/unload Alexei Starovoitov
[not found] ` <1405657206-12060-10-git-send-email-ast-uqk4Ao+rVK5Wk0Htik3J/w@public.gmane.org>
2014-07-23 19:00 ` Kees Cook
[not found] ` <CAGXu5j+gMepR-euMhBjYqMVHsdJM-Do5yc0rLw5dMK-C9BBieA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-23 20:22 ` Alexei Starovoitov
2014-07-18 4:20 ` [PATCH RFC v2 net-next 10/16] bpf: add eBPF verifier Alexei Starovoitov
[not found] ` <1405657206-12060-11-git-send-email-ast-uqk4Ao+rVK5Wk0Htik3J/w@public.gmane.org>
2014-07-23 23:38 ` Kees Cook
2014-07-24 0:48 ` Alexei Starovoitov
2014-07-24 18:25 ` Andy Lutomirski
[not found] ` <CALCETrUt1yLXTt5pDZJd0s4s+4dhs0LB7tbJYd6p1+EbdNWw7w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-24 19:25 ` Alexei Starovoitov
[not found] ` <CAMEtUuygJoH+PBNksTwRHyRObCZixoTDFzmnHroErZHZLaGNbg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-08-12 19:32 ` Andy Lutomirski
[not found] ` <CALCETrUDb6kLH_Qp=YMm=m3P_hmEu3dfDTse=ptCsdpO9EEcAQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-08-12 20:00 ` Alexei Starovoitov
[not found] ` <CAMEtUuz2DS8Ks0L15K0Jsj_nFjgvDh0TBwb+5pHzrdU+o6co_g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-08-12 20:10 ` Andy Lutomirski
[not found] ` <CALCETrUV+CSJzBzec7fRc6k4yDd+kCxz6Zi8zGNOQvACoKkP9A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-08-12 20:43 ` Alexei Starovoitov
2014-07-18 4:20 ` [PATCH RFC v2 net-next 11/16] bpf: allow eBPF programs to use maps Alexei Starovoitov
2014-07-18 4:20 ` [PATCH RFC v2 net-next 12/16] net: sock: allow eBPF programs to be attached to sockets Alexei Starovoitov
2014-07-18 4:20 ` [PATCH RFC v2 net-next 13/16] tracing: allow eBPF programs to be attached to events Alexei Starovoitov
2014-07-23 23:46 ` Kees Cook
[not found] ` <CAGXu5jJyw19h0+AwZEWSJt7hGnkRHAsf8fYim=XLzA-LH=svjw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-24 0:06 ` Alexei Starovoitov
2014-07-18 4:20 ` [PATCH RFC v2 net-next 14/16] samples: bpf: add mini eBPF library to manipulate maps and programs Alexei Starovoitov
2014-07-18 4:20 ` [PATCH RFC v2 net-next 15/16] samples: bpf: example of stateful socket filtering Alexei Starovoitov
2014-07-18 4:20 ` [PATCH RFC v2 net-next 16/16] samples: bpf: example of tracing filters with eBPF Alexei Starovoitov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1405657206-12060-7-git-send-email-ast@plumgrid.com \
--to=ast-uqk4ao+rvk5wk0htik3j/w@public.gmane.org \
--cc=a.p.zijlstra-/NLkJaSkS4VmR6Xm/wNWPw@public.gmane.org \
--cc=acme-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=chema-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=dborkman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=edumazet-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org \
--cc=jolsa-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
--cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=luto-kltTT9wpgjJwATOyAt5JVQ@public.gmane.org \
--cc=mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=rostedt-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org \
--cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
--cc=torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).