mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexei Starovoitov <ast@plumgrid.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: Ingo Molnar <mingo@kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Andy Lutomirski <luto@amacapital.net>,
	Steven Rostedt <rostedt@goodmis.org>,
	Daniel Borkmann <dborkman@redhat.com>,
	Chema Gonzalez <chema@google.com>,
	Eric Dumazet <edumazet@google.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Kees Cook <keescook@chromium.org>,
	linux-api@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH RFC v4 net-next 04/26] bpf: enable bpf syscall on x64
Date: Wed, 13 Aug 2014 00:57:15 -0700	[thread overview]
Message-ID: <1407916658-8731-5-git-send-email-ast@plumgrid.com> (raw)
In-Reply-To: <1407916658-8731-1-git-send-email-ast@plumgrid.com>

done as separate commit to ease conflict resolution

Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
---
 arch/x86/syscalls/syscall_64.tbl  |    1 +
 include/linux/syscalls.h          |    3 ++-
 include/uapi/asm-generic/unistd.h |    4 +++-
 kernel/sys_ni.c                   |    3 +++
 4 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/arch/x86/syscalls/syscall_64.tbl b/arch/x86/syscalls/syscall_64.tbl
index 252c804bb1aa..1416e32f20f1 100644
--- a/arch/x86/syscalls/syscall_64.tbl
+++ b/arch/x86/syscalls/syscall_64.tbl
@@ -325,6 +325,7 @@
 316	common	renameat2		sys_renameat2
 317	common	seccomp			sys_seccomp
 318	common	getrandom		sys_getrandom
+319	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 701daff5d899..cc2e197e0875 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -870,5 +870,6 @@ asmlinkage long sys_seccomp(unsigned int op, unsigned int flags,
 			    const char __user *uargs);
 asmlinkage long sys_getrandom(char __user *buf, size_t count,
 			      unsigned 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 f1afd607f043..3b625b281804 100644
--- a/include/uapi/asm-generic/unistd.h
+++ b/include/uapi/asm-generic/unistd.h
@@ -703,9 +703,11 @@ __SYSCALL(__NR_renameat2, sys_renameat2)
 __SYSCALL(__NR_seccomp, sys_seccomp)
 #define __NR_getrandom 278
 __SYSCALL(__NR_getrandom, sys_getrandom)
+#define __NR_bpf 279
+__SYSCALL(__NR_bpf, sys_bpf)
 
 #undef __NR_syscalls
-#define __NR_syscalls 279
+#define __NR_syscalls 280
 
 /*
  * All syscalls below here should go away really,
diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c
index 2904a2105914..d67ab4e618f7 100644
--- a/kernel/sys_ni.c
+++ b/kernel/sys_ni.c
@@ -216,3 +216,6 @@ cond_syscall(sys_kcmp);
 
 /* operate on Secure Computing state */
 cond_syscall(sys_seccomp);
+
+/* access BPF programs and maps */
+cond_syscall(sys_bpf);
-- 
1.7.9.5


  parent reply	other threads:[~2014-08-13  8:16 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-13  7:57 [PATCH RFC v4 net-next 00/26] BPF syscall, maps, verifier, samples, llvm Alexei Starovoitov
2014-08-13  7:57 ` [PATCH RFC v4 net-next 01/26] net: filter: add "load 64-bit immediate" eBPF instruction Alexei Starovoitov
2014-08-13  9:17   ` Daniel Borkmann
2014-08-13 17:34     ` Alexei Starovoitov
2014-08-13 17:39       ` Daniel Borkmann
2014-08-13 16:08   ` Andy Lutomirski
2014-08-13 17:44     ` Alexei Starovoitov
2014-08-13 18:35       ` Andy Lutomirski
2014-08-13 21:02         ` Alexei Starovoitov
2014-08-13 21:16           ` H. Peter Anvin
2014-08-13 21:17           ` Andy Lutomirski
2014-08-13 21:21             ` H. Peter Anvin
2014-08-13 21:23               ` Andy Lutomirski
2014-08-13 21:27                 ` H. Peter Anvin
2014-08-13 21:38                   ` Alexei Starovoitov
2014-08-13 21:56                     ` Alexei Starovoitov
2014-08-13 21:41                   ` Andy Lutomirski
2014-08-13 21:43                     ` Alexei Starovoitov
2014-08-13 21:37             ` Alexei Starovoitov
2014-08-13 21:38               ` Andy Lutomirski
2014-08-13  7:57 ` [PATCH RFC v4 net-next 02/26] net: filter: split filter.h and expose eBPF to user space Alexei Starovoitov
2014-08-13  7:57 ` [PATCH RFC v4 net-next 03/26] bpf: introduce syscall(BPF, ...) and BPF maps Alexei Starovoitov
2014-08-14 22:28   ` Brendan Gregg
2014-08-15  6:40     ` Alexei Starovoitov
2014-08-13  7:57 ` Alexei Starovoitov [this message]
2014-08-13  7:57 ` [PATCH RFC v4 net-next 05/26] bpf: add lookup/update/delete/iterate methods to " Alexei Starovoitov
2014-08-13  7:57 ` [PATCH RFC v4 net-next 06/26] bpf: add hashtable type of " Alexei Starovoitov
2014-08-13  7:57 ` [PATCH RFC v4 net-next 07/26] bpf: expand BPF syscall with program load/unload Alexei Starovoitov
2014-08-13  7:57 ` [PATCH RFC v4 net-next 08/26] bpf: handle pseudo BPF_CALL insn Alexei Starovoitov
2014-08-13  7:57 ` [PATCH RFC v4 net-next 09/26] bpf: verifier (add docs) Alexei Starovoitov
2014-08-13  7:57 ` [PATCH RFC v4 net-next 10/26] bpf: verifier (add ability to receive verification log) Alexei Starovoitov
2014-08-13  7:57 ` [PATCH RFC v4 net-next 11/26] bpf: handle pseudo BPF_LD_IMM64 insn Alexei Starovoitov
2014-08-13  7:57 ` [PATCH RFC v4 net-next 12/26] bpf: verifier (add branch/goto checks) Alexei Starovoitov
2014-08-13  7:57 ` [PATCH RFC v4 net-next 13/26] bpf: verifier (add verifier core) Alexei Starovoitov
2014-08-13  7:57 ` [PATCH RFC v4 net-next 14/26] bpf: verifier (add state prunning optimization) Alexei Starovoitov
2014-08-13  7:57 ` [PATCH RFC v4 net-next 15/26] bpf: allow eBPF programs to use maps Alexei Starovoitov
2014-08-13  7:57 ` [PATCH RFC v4 net-next 16/26] net: sock: allow eBPF programs to be attached to sockets Alexei Starovoitov
2014-08-13  7:57 ` [PATCH RFC v4 net-next 17/26] tracing: allow eBPF programs to be attached to events Alexei Starovoitov
2014-08-14 21:20   ` Brendan Gregg
2014-08-15  6:08     ` Alexei Starovoitov
2014-08-15 17:20       ` Andy Lutomirski
2014-08-15 17:36         ` Alexei Starovoitov
2014-08-15 18:50           ` Andy Lutomirski
2014-08-15 18:56             ` Alexei Starovoitov
2014-08-15 19:02               ` Andy Lutomirski
2014-08-15 19:16                 ` Alexei Starovoitov
2014-08-15 19:18                   ` Andy Lutomirski
2014-08-15 19:35                     ` Alexei Starovoitov
2014-08-19 18:39                     ` Alexei Starovoitov
2014-08-15 17:25   ` Andy Lutomirski
2014-08-15 17:51     ` Alexei Starovoitov
2014-08-15 18:53       ` Andy Lutomirski
2014-08-15 19:07         ` Alexei Starovoitov
2014-08-15 19:20           ` Andy Lutomirski
2014-08-15 19:29             ` Alexei Starovoitov
2014-08-15 19:32               ` Andy Lutomirski
2014-08-13  7:57 ` [PATCH RFC v4 net-next 18/26] tracing: allow eBPF programs to be attached to kprobe/kretprobe Alexei Starovoitov
2014-08-13  7:57 ` [PATCH RFC v4 net-next 19/26] samples: bpf: add mini eBPF library to manipulate maps and programs Alexei Starovoitov
2014-08-13  7:57 ` [PATCH RFC v4 net-next 20/26] samples: bpf: example of stateful socket filtering Alexei Starovoitov
2014-08-13  7:57 ` [PATCH RFC v4 net-next 21/26] samples: bpf: example of tracing filters with eBPF Alexei Starovoitov
2014-08-13  7:57 ` [PATCH RFC v4 net-next 22/26] bpf: llvm backend Alexei Starovoitov
2014-08-13  7:57 ` [PATCH RFC v4 net-next 23/26] samples: bpf: elf file loader Alexei Starovoitov
2014-08-14 19:29   ` Brendan Gregg
2014-08-15  5:56     ` Alexei Starovoitov
2014-08-13  7:57 ` [PATCH RFC v4 net-next 24/26] samples: bpf: eBPF example in C Alexei Starovoitov
2014-08-13  7:57 ` [PATCH RFC v4 net-next 25/26] samples: bpf: counting " Alexei Starovoitov
2014-08-14 22:13   ` Brendan Gregg
2014-08-15  6:19     ` Alexei Starovoitov
2014-08-13  7:57 ` [PATCH RFC v4 net-next 26/26] bpf: verifier test Alexei Starovoitov
2014-08-13  8:52 ` [PATCH RFC v4 net-next 00/26] BPF syscall, maps, verifier, samples, llvm David Laight
2014-08-13 17:30   ` Alexei Starovoitov
2014-08-13 17:40     ` Andy Lutomirski
2014-08-13 18:00       ` Alexei Starovoitov
2014-08-13 23:25   ` David Miller
2014-08-13 23:34     ` Andy Lutomirski
2014-08-13 23:46       ` Alexei Starovoitov
2014-08-13 23:53         ` Andy Lutomirski
2014-08-14 19:17 ` Brendan Gregg

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=1407916658-8731-5-git-send-email-ast@plumgrid.com \
    --to=ast@plumgrid.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=chema@google.com \
    --cc=davem@davemloft.net \
    --cc=dborkman@redhat.com \
    --cc=edumazet@google.com \
    --cc=hpa@zytor.com \
    --cc=keescook@chromium.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mingo@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=torvalds@linux-foundation.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

Powered by JetHome