complete.
Error is handled only in __sk_migrate_filter() while memory can still leak in
the error path right after sk_chk_filter().
Signed-off-by: Leon Yu chianglun...@gmail.com
Nice catch. Thanks!
kmemleak confirmed the leak.
Acked-by: Alexei Starovoitov a...@plumgrid.com
Tested-by: Alexei
filter.c into kernel/bpf/core.c instead of net/bpf/core.c
Alexei Starovoitov (2):
net: filter: split filter.c into two files
net: filter: split BPF out of core networking
arch/Kconfig |6 +-
include/linux/filter.h |2 +
kernel/Makefile|1 +
kernel/bpf/Makefile
seccomp selects BPF only instead of whole NET
Other BPF users (like tracing filters) will select BPF only too
Signed-off-by: Alexei Starovoitov a...@plumgrid.com
---
arch/Kconfig |6 +-
kernel/Makefile |2 +-
kernel/bpf/core.c | 21 +
net/Kconfig
=um build...
Acked-by: Alexei Starovoitov a...@plumgrid.com
---
net/core/filter.c | 71
+--
1 file changed, 37 insertions(+), 34 deletions(-)
diff --git a/net/core/filter.c b/net/core/filter.c
index 9aaa05a..c442a0d 100644
--- a/net/core
/test_bpf.ko] undefined!
ERROR: sk_run_filter_int_skb [lib/test_bpf.ko] undefined!
ERROR: __alloc_skb [lib/test_bpf.ko] undefined!
Add the dependency.
Cc: Alexei Starovoitov a...@plumgrid.com
Signed-off-by: David Rientjes rient...@google.com
commit 98920ba6911c7 (net: fix test_bpf build
. It is used to do 'regex'-style filter matching
in the example above. All generated BPF programs can be JITed.
Signed-off-by: Alexei Starovoitov a...@plumgrid.com
---
The patches for x64_64 BPF JIT were sent separately. This one is an RFC.
kernel/trace/Kconfig |1 +
kernel/trace/trace.h
On Tue, May 13, 2014 at 8:07 PM, Steven Rostedt rost...@goodmis.org wrote:
On Tue, 13 May 2014 19:55:11 -0700
Alexei Starovoitov a...@plumgrid.com wrote:
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -79,6 +79,7 @@ config FTRACE_NMI_ENTER
default y
config EVENT_TRACING
On Tue, May 13, 2014 at 8:17 PM, Steven Rostedt rost...@goodmis.org wrote:
On Tue, 13 May 2014 19:55:11 -0700
Alexei Starovoitov a...@plumgrid.com wrote:
Tracing filters are parsing user supplied character string and constructing
a predicate tree. filter_match_preds() was used to walk nodes
On Mon, Jun 16, 2014 at 7:18 AM, Michal Marek mma...@suse.cz wrote:
When $srctree or $objtree are relative paths, we cannot change directory
and refer to them in the same subshell. Do the redirection outside of
the subshell to fix this.
Reported-by: Ilya Dryomov idryo...@gmail.com
.
Sounds great! If you find some tests are missing, please feel free to
submit them as well via netdev.
Best,
Daniel
Daniel,
thank you for taking care of it so quickly :)
from the BPF perspective the fix looks good:
Acked-by: Alexei Starovoitov a...@plumgrid.com
Markos,
please do run the testsuite
On Mon, Jun 2, 2014 at 7:16 AM, Arnaldo Carvalho de Melo
a...@kernel.org wrote:
Em Mon, Jun 02, 2014 at 09:24:56AM -0400, Steven Rostedt escreveu:
On Mon, 2 Jun 2014 08:15:45 -0500
Jonathan Corbet cor...@lwn.net wrote:
On Mon, 2 Jun 2014 00:01:44 -0700
Alexei Starovoitov a...@plumgrid.com
On Mon, Jun 2, 2014 at 1:57 AM, Daniel Borkmann dbork...@redhat.com wrote:
On 06/02/2014 09:01 AM, Alexei Starovoitov wrote:
This patch set splits BPF out of core networking into generic component
patch #1 splits filter.c into two logical pieces: generic BPF core and
socket
filters. It only
extending cc-list, since I think this thread is related to bpf split thread.
On Mon, Jun 2, 2014 at 5:36 AM, Daniel Borkmann dbork...@redhat.com wrote:
On 05/30/2014 07:12 PM, Chema Gonzalez wrote:
On Thu, May 29, 2014 at 4:54 PM, Daniel Borkmann dbork...@redhat.com
wrote:
I actually liked
On Mon, Jun 2, 2014 at 10:04 AM, Daniel Borkmann dbork...@redhat.com wrote:
On 06/02/2014 05:41 PM, Alexei Starovoitov wrote:
...
Glad you brought up this point :)
100% agree that current double verification done by seccomp is far from
being generic and quite hard to maintain, since any
On Tue, Jun 3, 2014 at 1:56 AM, Daniel Borkmann dbork...@redhat.com wrote:
On 06/02/2014 09:02 PM, Alexei Starovoitov wrote:
...
Classic has all sorts of hard coded assumptions. The whole
concept of 'load from magic constant' to mean different things
is flawed. We all got used to it and now
On Tue, Jun 3, 2014 at 1:33 AM, Daniel Borkmann dbork...@redhat.com wrote:
On 06/02/2014 06:48 PM, Alexei Starovoitov wrote:
imo there are pros and cons in Daniel's and Chema's proposals
for classic BPF extensions.
I like Chema's a bit more, since his proposal doesn't require to
change
On Tue, Jun 3, 2014 at 1:35 PM, Daniel Borkmann dbork...@redhat.com wrote:
On 06/03/2014 05:44 PM, Alexei Starovoitov wrote:
...
All of your points are valid. They are right questions to ask. I just
don't see why you're still arguing about first step of filter.c split,
whereas your concerns
On Tue, Jun 3, 2014 at 2:40 PM, Chema Gonzalez ch...@google.com wrote:
First of all, and just to join the crowd, kernel/bpf/ FTW.
Now, I have some suggestions about eBPF. IMO classic BPF is an ISA
oriented to filter (meaning returning a single integer that states how
many bytes of the packet
/MSI: Export MSI mode using attributes, not kobjects)
Signed-off-by: Alexei Starovoitov a...@plumgrid.com
---
This was found by kmemleak report:
unreferenced object 0x880808eda600 (size 64):
comm modprobe, pid 1526, jiffies 4294902299 (age 58422.716s)
hex dump (first 32 bytes):
20 c4 66
On Sat, Jan 18, 2014 at 3:31 AM, Dorau, Lukasz lukasz.do...@intel.com wrote:
On Friday, January 17, 2014 10:44 PM Alexei Starovoitov
alexei.starovoi...@gmail.com wrote:
On Fri, Jan 17, 2014 at 1:02 PM, Markus Trippelsdorf
mar...@trippelsdorf.de wrote:
On 2014.01.17 at 11:58 -0800, Alexei
On Tue, Jan 21, 2014 at 8:10 PM, dormando dorma...@rydia.net wrote:
On Tue, 21 Jan 2014, Alexei Starovoitov wrote:
On Tue, Jan 21, 2014 at 5:39 PM, dormando dorma...@rydia.net wrote:
On Fri, Jan 17, 2014 at 11:16 PM, dormando dorma...@rydia.net wrote:
On Fri, 2014-01-17 at 22:49
On Tue, Jan 21, 2014 at 10:02 PM, Alexei Starovoitov
alexei.starovoi...@gmail.com wrote:
On Tue, Jan 21, 2014 at 8:10 PM, dormando dorma...@rydia.net wrote:
On Tue, 21 Jan 2014, Alexei Starovoitov wrote:
On Tue, Jan 21, 2014 at 5:39 PM, dormando dorma...@rydia.net wrote:
On Fri, Jan 17
]---
On Mon, Dec 9, 2013 at 6:38 PM, Alexei Starovoitov a...@plumgrid.com wrote:
Hi,
seeing the following trace on 3.10.xx kernels, including 3.10.23.
3.12.4 and 3.13rc2 are fine.
Is there a patch waiting to be backported?
[ 96.393807] llc[2903]: segfault at 8 ip 00692da7 sp
On Fri, Jan 17, 2014 at 5:37 AM, Dorau, Lukasz lukasz.do...@intel.com wrote:
Hi
My story is very simply...
I applied the following patch:
diff --git a/drivers/scsi/isci/init.c b/drivers/scsi/isci/init.c
--- a/drivers/scsi/isci/init.c
+++ b/drivers/scsi/isci/init.c
@@ -698,8 +698,11 @@
On Fri, Jan 17, 2014 at 9:58 AM, Alexei Starovoitov
alexei.starovoi...@gmail.com wrote:
On Fri, Jan 17, 2014 at 5:37 AM, Dorau, Lukasz lukasz.do...@intel.com wrote:
Hi
My story is very simply...
I applied the following patch:
diff --git a/drivers/scsi/isci/init.c b/drivers/scsi/isci/init.c
On Fri, Jan 17, 2014 at 1:02 PM, Markus Trippelsdorf
mar...@trippelsdorf.de wrote:
On 2014.01.17 at 11:58 -0800, Alexei Starovoitov wrote:
On Fri, Jan 17, 2014 at 9:58 AM, Alexei Starovoitov
alexei.starovoi...@gmail.com wrote:
On Fri, Jan 17, 2014 at 5:37 AM, Dorau, Lukasz lukasz.do
-rt_uncached);
+ list_del_init(rt-rt_uncached);
spin_unlock_bh(rt_uncached_lock);
}
}
Problem could come from this commit, in linux 3.10.23,
you also could try to revert it
commit 62713c4b6bc10c2d082ee1540e11b01a2b2162ab
Author: Alexei Starovoitov
On Thu, Jan 30, 2014 at 6:16 PM, Eric Dumazet eric.duma...@gmail.com wrote:
On Wed, 2014-01-29 at 23:05 -0800, dormando wrote:
We hit the routing code fairly hard. Any hints for what to look at or how
to instrument it? Or if it's fixed already? It's a real pain to iterate
since it takes ~30
On Tue, Dec 10, 2013 at 7:47 AM, Ingo Molnar mi...@kernel.org wrote:
* Alexei Starovoitov a...@plumgrid.com wrote:
I'm fine if it becomes a requirement to have a vmlinux built with
DEBUG_INFO to use BPF and have a tool like perf to translate the
filters. But it that must not replace what
On Tue, Dec 10, 2013 at 7:35 PM, Masami Hiramatsu
masami.hiramatsu...@hitachi.com wrote:
(2013/12/11 11:32), Alexei Starovoitov wrote:
On Tue, Dec 10, 2013 at 7:47 AM, Ingo Molnar mi...@kernel.org wrote:
* Alexei Starovoitov a...@plumgrid.com wrote:
I'm fine if it becomes a requirement
On Fri, Dec 6, 2013 at 3:54 PM, Masami Hiramatsu
masami.hiramatsu...@hitachi.com wrote:
(2013/12/06 14:16), Alexei Starovoitov wrote:
On Thu, Dec 5, 2013 at 5:20 PM, Andi Kleen a...@firstfloor.org wrote:
the difference is bigger now: 484-145 vs 185-145
This is a obvious improvement, but imho
On Thu, Dec 5, 2013 at 5:20 PM, Andi Kleen a...@firstfloor.org wrote:
H. Peter Anvin h...@zytor.com writes:
Not to mention that in that case we might as well -- since we need a
compiler anyway -- generate the machine code in user space; the JIT
solution really only is useful if it can provide
On Thu, Dec 5, 2013 at 9:43 PM, Alexei Starovoitov a...@plumgrid.com wrote:
On Thu, Dec 5, 2013 at 2:38 AM, Ingo Molnar mi...@kernel.org wrote:
Also I'm thinking to add 'license_string' section to bpf binary format
and call license_is_gpl_compatible() on it during load.
If false, then just
Hi,
seeing the following trace on 3.10.xx kernels, including 3.10.23.
3.12.4 and 3.13rc2 are fine.
Is there a patch waiting to be backported?
[ 96.393807] llc[2903]: segfault at 8 ip 00692da7 sp
7fff1a6baf30 error 4 in llc[40+7f8000]
[ 96.394304] BUG: sleeping function called
On Tue, Mar 25, 2014 at 5:46 PM, David Miller da...@davemloft.net wrote:
From: H. Peter Anvin h...@linux.intel.com
Date: Tue, 25 Mar 2014 17:24:27 -0700
If you allow loops, it greatly increases the expressibility of the
language, but we would really need another control to limit CPU usage.
On Thu, Mar 27, 2014 at 12:23 PM, David Miller da...@davemloft.net wrote:
From: Daniel Borkmann dbork...@redhat.com
Date: Wed, 26 Mar 2014 22:06:09 +0100
- Adds swab insns for 32/64-bit
I don't like this.
You don't want a swab instruction, you want endian X to endian Y. Just
like we
On Sun, May 4, 2014 at 3:53 PM, Stephen Hemminger
step...@networkplumber.org wrote:
On Mon, 5 May 2014 07:29:34 +1000
Jon Maxwell jmaxwel...@gmail.com wrote:
There has been a number incidents recently where customers running KVM have
reported that VM hosts on different Hypervisors are
On Tue, May 6, 2014 at 6:34 AM, Tom Zanussi tom.zanu...@linux.intel.com wrote:
On Tue, 2014-05-06 at 09:25 +0200, Richard Weinberger wrote:
On Tue, May 6, 2014 at 12:25 AM, Andi Kleen a...@firstfloor.org wrote:
There has been a lot of interest recently to run Linux on very small
systems,
On Tue, May 6, 2014 at 8:34 AM, Tom Zanussi tom.zanu...@linux.intel.com wrote:
On Tue, 2014-05-06 at 08:20 -0700, Alexei Starovoitov wrote:
On Tue, May 6, 2014 at 6:34 AM, Tom Zanussi tom.zanu...@linux.intel.com
wrote:
On Tue, 2014-05-06 at 09:25 +0200, Richard Weinberger wrote:
On Tue
On Tue, May 6, 2014 at 1:00 PM, Andi Kleen a...@firstfloor.org wrote:
not quite. I'm saying: no extra optimizations, no GCC changes.
Compile kernel as-is. Most functions have a stub for mcount() already.
Use it to track whether kernel function was called or not.
Collect this data in userspace
It seems commit f4d4ffc03efc (kbuild: dtbs_install: new make target)
breaks 'fakeroot make-kpkg' package creation on ubuntu.
Didn't investigate the root cause yet, just heads up.
The errors I see:
update-initramfs: Generating
/w/net/debian/linux-image-3.14.0+//boot/initrd.img-3.14.0+
grep:
On Thu, Apr 3, 2014 at 6:21 PM, Jovi Zhangwei jovi.zhang...@gmail.com wrote:
Hi Alexei,
We talked a lot on ktap and ebpf integration in these days,
Now I think we can put into deeply to thinking out some
technical issues in there.
Firstly, I want to make sure you are support this ktap and
On Fri, Apr 4, 2014 at 1:46 AM, Jovi Zhangwei jovi.zhang...@gmail.com wrote:
On Fri, Apr 4, 2014 at 3:48 PM, Ingo Molnar mi...@kernel.org wrote:
* Jovi Zhangwei jovi.zhang...@gmail.com wrote:
On Fri, Apr 4, 2014 at 2:26 PM, Alexei Starovoitov a...@plumgrid.com
wrote:
On Thu, Apr 3, 2014
On Fri, Apr 4, 2014 at 7:20 AM, Andi Kleen a...@firstfloor.org wrote:
BTW I agree that EBPF won't work for ktap. The models
(static vs dynamic typing etc.) are just too different.
If you meant 'static vs dynamic safety checking' then yes.
This is a main difference between bpf and ktap approach
On Fri, Apr 4, 2014 at 1:17 PM, Theodore Ts'o ty...@mit.edu wrote:
On Fri, Apr 04, 2014 at 03:44:26PM -0400, Steven Rostedt wrote:
I saw one commenter say that this was a kernel bug because writing to
kmsg shouldn't cause the system to hang.
The rate-limit patch would go along with that idea,
On Sat, Apr 5, 2014 at 7:23 AM, Jovi Zhangwei jovi.zhang...@gmail.com wrote:
On Sat, Apr 5, 2014 at 1:28 AM, Alexei Starovoitov a...@plumgrid.com wrote:
'ktap syntax' from user space point of view, can use ibpf as-is.
Show me the script and I can show how ibpf can run it.
Well, please don't
On Fri, Apr 4, 2014 at 8:27 AM, Jason Cooper ja...@lakedaemon.net wrote:
Alexei,
Thanks for the heads up.
On Thu, Apr 03, 2014 at 03:12:38PM -0700, Alexei Starovoitov wrote:
It seems commit f4d4ffc03efc (kbuild: dtbs_install: new make target)
breaks 'fakeroot make-kpkg' package creation
On Tue, Apr 8, 2014 at 2:08 AM, Peter Zijlstra pet...@infradead.org wrote:
On Tue, Apr 08, 2014 at 04:40:36PM +0900, Masami Hiramatsu wrote:
(2014/04/07 22:55), Peter Zijlstra wrote:
On Wed, Apr 02, 2014 at 09:42:03AM +0200, Ingo Molnar wrote:
I'd suggest using C syntax instead initially,
On Mon, Apr 14, 2014 at 1:28 PM, Andy Lutomirski l...@amacapital.net wrote:
On Mon, Apr 14, 2014 at 1:24 PM, David Miller da...@davemloft.net wrote:
From: Andy Lutomirski l...@amacapital.net
Date: Mon, 14 Apr 2014 13:13:45 -0700
I think this description is wrong. (unsigned long *) sd-args[1]
On Mon, Apr 14, 2014 at 9:02 AM, Masami Ichikawa masami...@gmail.com wrote:
kmemleak reported some memory leak as below.
grrr. yes. sorry.
unreferenced object 0x8800d6ea4000 (size 512):
comm sshd, pid 278, jiffies 4294898315 (age 46.653s)
hex dump (first 32 bytes):
21 00 00 00
...@vger.kernel.org
Acked-by: Alexei Starovoitov a...@plumgrid.com
---
kernel/seccomp.c |2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/seccomp.c b/kernel/seccomp.c
index fd609bd9d6dd..2d7dcdfb7422 100644
--- a/kernel/seccomp.c
+++ b/kernel/seccomp.c
@@ -256,6 +256,7 @@ static long
On Mon, Apr 14, 2014 at 10:26 AM, Kees Cook keesc...@chromium.org wrote:
On Mon, Apr 14, 2014 at 10:17 AM, Alexei Starovoitov a...@plumgrid.com
wrote:
On Mon, Apr 14, 2014 at 10:11 AM, Kees Cook keesc...@chromium.org wrote:
This sets the correct error code when final filter memory
On Mon, Mar 31, 2014 at 3:01 AM, Jovi Zhangwei jovi.zhang...@gmail.com wrote:
Hi Ingo,
On Mon, Mar 31, 2014 at 3:17 PM, Ingo Molnar mi...@kernel.org wrote:
* Jovi Zhangwei jovi.zhang...@gmail.com wrote:
Hi All,
The following set of patches add ktap tracing tool.
ktap is a new
On Mon, Mar 31, 2014 at 9:47 PM, Jovi Zhangwei jovi.zhang...@gmail.com wrote:
Hi Alexei,
On Tue, Apr 1, 2014 at 5:29 AM, Alexei Starovoitov a...@plumgrid.com wrote:
On Mon, Mar 31, 2014 at 3:01 AM, Jovi Zhangwei jovi.zhang...@gmail.com
wrote:
Hi Ingo,
On Mon, Mar 31, 2014 at 3:17 PM, Ingo
On Wed, Jul 9, 2014 at 3:00 PM, Will Deacon will.dea...@arm.com wrote:
On Tue, Jul 08, 2014 at 08:06:53AM +0100, Zi Shen Lim wrote:
1. Implement remaining classes of eBPF instructions: ST|MEM, STX|XADD
which currently do not have corresponding test cases in test_bpf.
I can help out with
On Fri, Jun 20, 2014 at 9:44 AM, Chema Gonzalez ch...@google.com wrote:
Model eBPF based on MIPS ISA? Ouch.
That would be one ugly ISA that is not JITable on x64.
Definitely I wasn't making my point clear: IMO if we're redesigning
the BPF ISA, we should get a clean one (clean=something that
On Wed, Jun 18, 2014 at 11:00 AM, Boaz Harrosh open...@gmail.com wrote:
Hi Sir Michal
Below patch broke my stupid yet useful IDE tool. I use kdevelop.
kdevelop now gets confused on warnings and errors because it now comes out
as (for example):
../fs/ext4/fsync.c:63:3: error: implicit
: bd4cf0ed331a (net: filter: rework/optimize internal BPF interpreter's
instruction set)
Signed-off-by: Kees Cook keesc...@chromium.org
Cc: sta...@vger.kernel.org # v3.15+
Acked-by: Alexei Starovoitov a...@plumgrid.com
I wonder how did you catch this? :)
Just code inspection or seccomp
On Wed, Jun 18, 2014 at 3:55 PM, Kees Cook keesc...@chromium.org wrote:
On Wed, Jun 18, 2014 at 3:48 PM, Alexei Starovoitov a...@plumgrid.com wrote:
On Wed, Jun 18, 2014 at 3:34 PM, Kees Cook keesc...@chromium.org wrote:
The original checks (via sk_chk_filter) for instruction count uses
On Mon, Jul 21, 2014 at 2:16 AM, Will Deacon will.dea...@arm.com wrote:
Hello,
On Fri, Jul 18, 2014 at 07:28:06PM +0100, Zi Shen Lim wrote:
This series implements eBPF JIT compiler for arm64.
Please see [14/14] for change log.
Patches [1-13/14] implement code generation functions.
Patch
is counting events, user space
prints them.
Patch 1/3 is a parser of .o file generated by LLVM. It looks for pre-defined
ELF sections like 'license', 'maps', 'events' and loads bpf maps/programs
via BPF syscall that I posted earlier.
Alexei Starovoitov (3):
samples: bpf: elf file loader
and programs
Signed-off-by: Alexei Starovoitov a...@plumgrid.com
---
samples/bpf/Makefile |6 --
samples/bpf/ex2_kern.c | 29 +
samples/bpf/ex2_user.c | 28
3 files changed, 61 insertions(+), 2 deletions(-)
create mode 100644
-25476 [002] ..s3 5640.716272: __netif_receive_skb_core: skb 5d06300 dev
b9e6000
Ctrl-C at any time, kernel will auto cleanup
Signed-off-by: Alexei Starovoitov a...@plumgrid.com
---
samples/bpf/Makefile | 15 +--
samples/bpf/ex1_kern.c | 27 +++
samples
simple .o parser and loader using BPF syscall.
.o is a standard ELF generated by LLVM backend
/* parses elf file compiled by llvm .c-.o
* creates maps and stores FD into map_fd array
* loads eBPF programs
* returns zero on success
*/
int load_bpf_file(char *path);
Signed-off-by: Alexei
for eBPF core pieces
In the foreseeable future eBPF patches will be going through net-next,
so put netdev as a primary mailing list
[1] git://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf master
Alexei Starovoitov (2):
net: filter: split filter.c into two files
bpf: update MAINTAINERS entry
Signed-off-by: Alexei Starovoitov a...@plumgrid.com
---
MAINTAINERS |7 +++
1 file changed, 7 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 78215a5dea28..62bf15f6954f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1912,6 +1912,13 @@ S: Supported
F: drivers/net
. The new
+ * internal format has been designed by PLUMgrid:
+ *
+ * Copyright (c) 2011 - 2014 PLUMgrid, http://plumgrid.com
+ *
+ * Authors:
+ *
+ * Jay Schulist jsch...@samba.org
+ * Alexei Starovoitov a...@plumgrid.com
+ * Daniel Borkmann dbork...@redhat.com
+ *
+ * This program
program
Signed-off-by: Alexei Starovoitov a...@plumgrid.com
---
arch/alpha/include/uapi/asm/socket.h |2 +
arch/avr32/include/uapi/asm/socket.h |2 +
arch/cris/include/uapi/asm/socket.h|2 +
arch/frv/include/uapi/asm/socket.h |2 +
arch/ia64/include/uapi/asm/socket.h
add new map type: BPF_MAP_TYPE_HASH
and its simple (not auto resizeable) hash table implementation
Signed-off-by: Alexei Starovoitov a...@plumgrid.com
---
include/uapi/linux/bpf.h |1 +
kernel/bpf/Makefile |2 +-
kernel/bpf/hashtab.c | 371
(map_id, fp - 4);
if (value)
(*(u64*)value) += 1;
- attaches this program to eth0 raw socket
- every second user space reads map[6] and map[17] to see how many
TCP and UDP packets were seen on eth0
Signed-off-by: Alexei Starovoitov a...@plumgrid.com
---
samples/bpf/.gitignore
. The new
+ * internal format has been designed by PLUMgrid:
+ *
+ * Copyright (c) 2011 - 2014 PLUMgrid, http://plumgrid.com
+ *
+ * Authors:
+ *
+ * Jay Schulist jsch...@samba.org
+ * Alexei Starovoitov a...@plumgrid.com
+ * Daniel Borkmann dbork...@redhat.com
+ *
+ * This program
/delete elements in maps
- memcmp
- trace_printk
- load_pointer
- dump_stack
Signed-off-by: Alexei Starovoitov a...@plumgrid.com
---
include/linux/ftrace_event.h |5 +
include/trace/bpf_trace.h | 29 +
include/trace/ftrace.h | 10 ++
include/uapi/linux/bpf.h
expose bpf_map_lookup_elem(), bpf_map_update_elem(), bpf_map_delete_elem()
map accessors to eBPF programs
Signed-off-by: Alexei Starovoitov a...@plumgrid.com
---
include/linux/bpf.h |5 +++
include/uapi/linux/bpf.h |3 ++
kernel/bpf/syscall.c | 85
simple packet drop monitor:
- in-kernel eBPF program attaches to kfree_skb() event and records number
of packet drops at given location
- userspace iterates over the map every second and prints stats
Signed-off-by: Alexei Starovoitov a...@plumgrid.com
---
samples/bpf/Makefile |4
prototype
More details in Documentation/networking/filter.txt
Signed-off-by: Alexei Starovoitov a...@plumgrid.com
---
Documentation/networking/filter.txt | 233 ++
include/linux/bpf.h | 48 ++
include/uapi/linux/bpf.h|1 +
kernel/bpf/Makefile
);
Signed-off-by: Alexei Starovoitov a...@plumgrid.com
---
samples/bpf/libbpf.c | 114 ++
samples/bpf/libbpf.h | 18
2 files changed, 132 insertions(+)
create mode 100644 samples/bpf/libbpf.c
create mode 100644 samples/bpf/libbpf.h
diff
Signed-off-by: Alexei Starovoitov a...@plumgrid.com
---
MAINTAINERS |9 +
1 file changed, 9 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 48f4ef44b252..ebd831cd1a25 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1881,6 +1881,15 @@ S: Supported
F: drivers/net
in NET-less
configurations.
Signed-off-by: Alexei Starovoitov a...@plumgrid.com
---
Documentation/networking/filter.txt | 69 ++
arch/x86/syscalls/syscall_64.tbl|1 +
include/linux/bpf.h | 44 +++
include/linux/syscalls.h|2 +
include/uapi/asm
(based on input key return next_key)
err = bpf_map_get_next_key(int map_id, void *key, void *next_key)
Signed-off-by: Alexei Starovoitov a...@plumgrid.com
---
include/linux/bpf.h |6 ++
include/uapi/linux/bpf.h | 25 +++
kernel/bpf/syscall.c | 180
://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf master
for you to fetch changes up to 4c8da0f21220087e38894c69339cddc64c1220f9:
samples: bpf: example of tracing filters with eBPF (2014-06-27 15:22:07 -0700)
Alexei Starovoitov (14):
net
cannot go into uapi/linux/filter.h, since the names
may conflict with existing applications.
Signed-off-by: Alexei Starovoitov a...@plumgrid.com
---
include/linux/filter.h| 294 +--
include/uapi/linux/Kbuild |1 +
include/uapi/linux/bpf.h | 305
and LICENSE)
TEXT - array of eBPF instructions
LICENSE - GPL compatible
- unload eBPF program
err = bpf_prog_unload(int prog_id)
User space example of syscall(__NR_bpf, BPF_PROG_LOAD, prog_id, prog_type, ...)
follows in later patches
Signed-off-by: Alexei Starovoitov a...@plumgrid.com
On Fri, Jun 27, 2014 at 5:16 PM, Andy Lutomirski l...@amacapital.net wrote:
On Fri, Jun 27, 2014 at 5:05 PM, Alexei Starovoitov a...@plumgrid.com wrote:
BPF syscall is a demux for different BPF releated commands.
'maps' is a generic storage of different types for sharing data between
kernel
On Fri, Jun 27, 2014 at 5:18 PM, Joe Perches j...@perches.com wrote:
Add MAINTAINERS entry.
On Fri, 2014-06-27 at 17:05 -0700, Alexei Starovoitov wrote:
diff --git a/MAINTAINERS b/MAINTAINERS
[]
@@ -1881,6 +1881,15 @@ S: Supported
F: drivers/net/bonding/
F: include/uapi/linux
On Fri, Jun 27, 2014 at 5:19 PM, Andy Lutomirski l...@amacapital.net wrote:
On Fri, Jun 27, 2014 at 5:05 PM, Alexei Starovoitov a...@plumgrid.com wrote:
eBPF programs are safe run-to-completion functions with load/unload
methods from userspace similar to kernel modules.
User space API
On Fri, Jun 27, 2014 at 5:21 PM, Andy Lutomirski l...@amacapital.net wrote:
On Fri, Jun 27, 2014 at 5:06 PM, Alexei Starovoitov a...@plumgrid.com wrote:
this socket filter example does:
- creates a hashtable in kernel with key 4 bytes and value 8 bytes
- populates map[6] = 0; map[17] = 0
On Fri, Jun 27, 2014 at 11:25 PM, Andy Lutomirski l...@amacapital.net wrote:
On Fri, Jun 27, 2014 at 10:55 PM, Alexei Starovoitov a...@plumgrid.com
wrote:
On Fri, Jun 27, 2014 at 5:16 PM, Andy Lutomirski l...@amacapital.net wrote:
On Fri, Jun 27, 2014 at 5:05 PM, Alexei Starovoitov
On Fri, Jun 27, 2014 at 11:28 PM, Andy Lutomirski l...@amacapital.net wrote:
On Fri, Jun 27, 2014 at 11:12 PM, Alexei Starovoitov a...@plumgrid.com
wrote:
On Fri, Jun 27, 2014 at 5:19 PM, Andy Lutomirski l...@amacapital.net wrote:
On Fri, Jun 27, 2014 at 5:05 PM, Alexei Starovoitov
On Sat, Jun 28, 2014 at 9:01 AM, Andy Lutomirski l...@amacapital.net wrote:
On Fri, Jun 27, 2014 at 5:06 PM, Alexei Starovoitov a...@plumgrid.com wrote:
Safety of eBPF programs is statically determined by the verifier, which
detects:
This is a very high-level review. I haven't tried to read
On Sat, Jun 28, 2014 at 8:34 AM, Andy Lutomirski l...@amacapital.net wrote:
On Fri, Jun 27, 2014 at 11:43 PM, Alexei Starovoitov a...@plumgrid.com
wrote:
On Fri, Jun 27, 2014 at 11:25 PM, Andy Lutomirski l...@amacapital.net
wrote:
On Fri, Jun 27, 2014 at 10:55 PM, Alexei Starovoitov
On Sat, Jun 28, 2014 at 6:58 PM, Andy Lutomirski l...@amacapital.net wrote:
These were great questions! I hope I answered them. If not, please
continue asking.
I have plenty more questions, but here's one right now: does anything
prevent programs from using pointers in comparisons, returning
On Sat, Jun 28, 2014 at 6:52 PM, Andy Lutomirski l...@amacapital.net wrote:
On Sat, Jun 28, 2014 at 1:49 PM, Alexei Starovoitov a...@plumgrid.com wrote:
Sorry I don't like 'fd' direction at all.
1. it will make the whole thing very socket specific and 'net' dependent.
but the goal here
On Sat, Jun 28, 2014 at 8:35 AM, Andy Lutomirski l...@amacapital.net wrote:
On Sat, Jun 28, 2014 at 8:21 AM, Greg KH gre...@linuxfoundation.org wrote:
On Sat, Jun 28, 2014 at 12:26:14AM -0700, Alexei Starovoitov wrote:
On Fri, Jun 27, 2014 at 11:28 PM, Andy Lutomirski l...@amacapital.net
On Mon, Jun 30, 2014 at 3:09 PM, Andy Lutomirski l...@amacapital.net wrote:
On Sat, Jun 28, 2014 at 11:36 PM, Alexei Starovoitov a...@plumgrid.com
wrote:
On Sat, Jun 28, 2014 at 6:52 PM, Andy Lutomirski l...@amacapital.net wrote:
On Sat, Jun 28, 2014 at 1:49 PM, Alexei Starovoitov
On Fri, Jul 4, 2014 at 8:17 AM, Andy Lutomirski l...@amacapital.net wrote:
On Wed, Jul 2, 2014 at 7:29 PM, Alexei Starovoitov a...@plumgrid.com wrote:
non-root API:
ufd = bpf_create_map(local_map_id,… )
bpf_map_update/delete/lookup_elem(ufd,…)
ufd = bpf_prog_load(insns)
close(ufd)
root
On Mon, Jul 7, 2014 at 5:20 AM, Paolo Bonzini pbonz...@redhat.com wrote:
Il 07/07/2014 12:29, David Drysdale ha scritto:
I think that's more easily done by opening the file as O_RDONLY/O_WRONLY
/O_RDWR. You could do it by running the file descriptor's seccomp-bpf
program once per iocb with
+ emit(A64_REV16(0, r0, r0), ctx);
+#endif
+ break;
+ case BPF_B:
+ emit(A64_LDRB(r0, r5, A64_ZR), ctx);
+ break;
+ case BPF_DW:
this case can be removed too.
Acked-by: Alexei Starovoitov
On Tue, Jul 1, 2014 at 1:05 AM, Daniel Borkmann dbork...@redhat.com wrote:
On 06/28/2014 02:06 AM, Alexei Starovoitov wrote:
Safety of eBPF programs is statically determined by the verifier, which
detects:
- loops
- out of range jumps
- unreachable instructions
- invalid instructions
On Tue, Jul 1, 2014 at 1:30 AM, Daniel Borkmann dbork...@redhat.com wrote:
On 06/28/2014 02:06 AM, Alexei Starovoitov wrote:
User interface:
cat bpf_123 /sys/kernel/debug/tracing/__event__/filter
where 123 is an id of the eBPF program priorly loaded.
__event__ is static tracepoint event
On Tue, Jul 1, 2014 at 8:11 AM, Andy Lutomirski l...@amacapital.net wrote:
On Mon, Jun 30, 2014 at 10:47 PM, Alexei Starovoitov a...@plumgrid.com
wrote:
On Mon, Jun 30, 2014 at 3:09 PM, Andy Lutomirski l...@amacapital.net wrote:
On Sat, Jun 28, 2014 at 11:36 PM, Alexei Starovoitov
101 - 200 of 4142 matches
Mail list logo