Re: [PATCH net 0/3] Fix for BPF devmap percpu allocation splat

2017-10-18 Thread Daniel Borkmann
On 10/18/2017 03:25 PM, Tejun Heo wrote: Hello, Daniel. (cc'ing Dennis) On Tue, Oct 17, 2017 at 04:55:51PM +0200, Daniel Borkmann wrote: The set fixes a splat in devmap percpu allocation when we alloc the flush bitmap. Patch 1 is a prerequisite for the fix in patch 2, patch 1 is rather small

Re: [PATCH net 0/3] Fix for BPF devmap percpu allocation splat

2017-10-17 Thread Daniel Borkmann
On 10/17/2017 05:03 PM, David Laight wrote: From: Daniel Borkmann Sent: 17 October 2017 15:56 The set fixes a splat in devmap percpu allocation when we alloc the flush bitmap. Patch 1 is a prerequisite for the fix in patch 2, patch 1 is rather small, so if this could be routed via -net

Re: [PATCH net 0/3] Fix for BPF devmap percpu allocation splat

2017-10-17 Thread Daniel Borkmann
On 10/17/2017 05:03 PM, David Laight wrote: From: Daniel Borkmann Sent: 17 October 2017 15:56 The set fixes a splat in devmap percpu allocation when we alloc the flush bitmap. Patch 1 is a prerequisite for the fix in patch 2, patch 1 is rather small, so if this could be routed via -net

[PATCH net 3/3] bpf: do not test for PCPU_MIN_UNIT_SIZE before percpu allocations

2017-10-17 Thread Daniel Borkmann
() calls which use the flag already. Signed-off-by: Daniel Borkmann <dan...@iogearbox.net> --- kernel/bpf/arraymap.c | 2 +- kernel/bpf/hashtab.c | 4 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/kernel/bpf/arraymap.c b/kernel/bpf/arraymap.c index 98c0f00..e263673

[PATCH net 3/3] bpf: do not test for PCPU_MIN_UNIT_SIZE before percpu allocations

2017-10-17 Thread Daniel Borkmann
() calls which use the flag already. Signed-off-by: Daniel Borkmann --- kernel/bpf/arraymap.c | 2 +- kernel/bpf/hashtab.c | 4 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/kernel/bpf/arraymap.c b/kernel/bpf/arraymap.c index 98c0f00..e263673 100644 --- a/kernel/bpf/arraymap.c

[PATCH net 0/3] Fix for BPF devmap percpu allocation splat

2017-10-17 Thread Daniel Borkmann
checks, which are percpu allocator internals and should not be used. Thanks! Daniel Borkmann (3): mm, percpu: add support for __GFP_NOWARN flag bpf: fix splat for illegal devmap percpu allocation bpf: do not test for PCPU_MIN_UNIT_SIZE before percpu allocations kernel/bpf/arraymap.c | 2

[PATCH net 0/3] Fix for BPF devmap percpu allocation splat

2017-10-17 Thread Daniel Borkmann
checks, which are percpu allocator internals and should not be used. Thanks! Daniel Borkmann (3): mm, percpu: add support for __GFP_NOWARN flag bpf: fix splat for illegal devmap percpu allocation bpf: do not test for PCPU_MIN_UNIT_SIZE before percpu allocations kernel/bpf/arraymap.c | 2

[PATCH net 1/3] mm, percpu: add support for __GFP_NOWARN flag

2017-10-17 Thread Daniel Borkmann
it generically by supporting the __GFP_NOWARN flag that users can then use with calling the __alloc_percpu_gfp() helper instead. Signed-off-by: Daniel Borkmann <dan...@iogearbox.net> Cc: Tejun Heo <t...@kernel.org> Cc: Mark Rutland <mark.rutl...@arm.com> --- mm/percpu.c | 15 ++---

[PATCH net 1/3] mm, percpu: add support for __GFP_NOWARN flag

2017-10-17 Thread Daniel Borkmann
it generically by supporting the __GFP_NOWARN flag that users can then use with calling the __alloc_percpu_gfp() helper instead. Signed-off-by: Daniel Borkmann Cc: Tejun Heo Cc: Mark Rutland --- mm/percpu.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/mm/percpu.c b

[PATCH net 2/3] bpf: fix splat for illegal devmap percpu allocation

2017-10-17 Thread Daniel Borkmann
__GFP_NOWARN instead. Fixes: 11393cc9b9be ("xdp: Add batching support to redirect map") Reported-by: Mark Rutland <mark.rutl...@arm.com> Reported-by: Shankara Pailoor <sp3...@columbia.edu> Reported-by: Richard Weinberger <rich...@nod.at> Signed-off-by: Daniel Borkma

[PATCH net 2/3] bpf: fix splat for illegal devmap percpu allocation

2017-10-17 Thread Daniel Borkmann
__GFP_NOWARN instead. Fixes: 11393cc9b9be ("xdp: Add batching support to redirect map") Reported-by: Mark Rutland Reported-by: Shankara Pailoor Reported-by: Richard Weinberger Signed-off-by: Daniel Borkmann Cc: John Fastabend --- kernel/bpf/devmap.c | 5 +++-- 1 file changed, 3

Re: [PATCH] bpf: devmap: Check attr->max_entries more carefully

2017-10-17 Thread Daniel Borkmann
On 10/17/2017 12:29 PM, Mark Rutland wrote: On Mon, Oct 16, 2017 at 08:52:13PM +0200, Daniel Borkmann wrote: [ +Tejun, Mark, John ] On 10/16/2017 12:00 AM, Richard Weinberger wrote: max_entries is user controlled and used as input for __alloc_percpu(). This function expects

Re: [PATCH] bpf: devmap: Check attr->max_entries more carefully

2017-10-17 Thread Daniel Borkmann
On 10/17/2017 12:29 PM, Mark Rutland wrote: On Mon, Oct 16, 2017 at 08:52:13PM +0200, Daniel Borkmann wrote: [ +Tejun, Mark, John ] On 10/16/2017 12:00 AM, Richard Weinberger wrote: max_entries is user controlled and used as input for __alloc_percpu(). This function expects

Re: [PATCH 3/3] bpf: Make sure that ->comm does not change under us.

2017-10-16 Thread Daniel Borkmann
On 10/17/2017 12:10 AM, Alexei Starovoitov wrote: On Mon, Oct 16, 2017 at 2:10 PM, Richard Weinberger <rich...@nod.at> wrote: Am Montag, 16. Oktober 2017, 23:02:06 CEST schrieb Daniel Borkmann: On 10/16/2017 10:55 PM, Richard Weinberger wrote: Am Montag, 16. Oktober 2017, 22:50:4

Re: [PATCH 3/3] bpf: Make sure that ->comm does not change under us.

2017-10-16 Thread Daniel Borkmann
On 10/17/2017 12:10 AM, Alexei Starovoitov wrote: On Mon, Oct 16, 2017 at 2:10 PM, Richard Weinberger wrote: Am Montag, 16. Oktober 2017, 23:02:06 CEST schrieb Daniel Borkmann: On 10/16/2017 10:55 PM, Richard Weinberger wrote: Am Montag, 16. Oktober 2017, 22:50:43 CEST schrieb Daniel

Re: [PATCH 3/3] bpf: Make sure that ->comm does not change under us.

2017-10-16 Thread Daniel Borkmann
On 10/16/2017 10:55 PM, Richard Weinberger wrote: Am Montag, 16. Oktober 2017, 22:50:43 CEST schrieb Daniel Borkmann: struct task_struct *task = current; + task_lock(task); strncpy(buf, task->comm, size); + task_unlock(task); Wouldn't this potentially l

Re: [PATCH 3/3] bpf: Make sure that ->comm does not change under us.

2017-10-16 Thread Daniel Borkmann
On 10/16/2017 10:55 PM, Richard Weinberger wrote: Am Montag, 16. Oktober 2017, 22:50:43 CEST schrieb Daniel Borkmann: struct task_struct *task = current; + task_lock(task); strncpy(buf, task->comm, size); + task_unlock(task); Wouldn't this potentially l

Re: [PATCH 3/3] bpf: Make sure that ->comm does not change under us.

2017-10-16 Thread Daniel Borkmann
On 10/16/2017 08:18 PM, Richard Weinberger wrote: Sadly we cannot use get_task_comm() since bpf_get_current_comm() allows truncation. Signed-off-by: Richard Weinberger --- kernel/bpf/helpers.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/bpf/helpers.c

Re: [PATCH 3/3] bpf: Make sure that ->comm does not change under us.

2017-10-16 Thread Daniel Borkmann
On 10/16/2017 08:18 PM, Richard Weinberger wrote: Sadly we cannot use get_task_comm() since bpf_get_current_comm() allows truncation. Signed-off-by: Richard Weinberger --- kernel/bpf/helpers.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/bpf/helpers.c b/kernel/bpf/helpers.c

Re: [PATCH 2/3] bpf: Remove dead variable

2017-10-16 Thread Daniel Borkmann
On 10/16/2017 09:22 PM, Richard Weinberger wrote: [...] So, I can happily squash 2/3 into 1/3 and resent. Yeah, please just squash them. Thanks, Daniel

Re: [PATCH 2/3] bpf: Remove dead variable

2017-10-16 Thread Daniel Borkmann
On 10/16/2017 09:22 PM, Richard Weinberger wrote: [...] So, I can happily squash 2/3 into 1/3 and resent. Yeah, please just squash them. Thanks, Daniel

Re: [PATCH 2/3] bpf: Remove dead variable

2017-10-16 Thread Daniel Borkmann
On 10/16/2017 08:59 PM, Richard Weinberger wrote: Am Montag, 16. Oktober 2017, 20:54:36 CEST schrieb Daniel Borkmann: On 10/16/2017 08:18 PM, Richard Weinberger wrote: task is never used in bpf_get_current_uid_gid(), kill it. Signed-off-by: Richard Weinberger <rich...@nod.at> ---

Re: [PATCH 2/3] bpf: Remove dead variable

2017-10-16 Thread Daniel Borkmann
On 10/16/2017 08:59 PM, Richard Weinberger wrote: Am Montag, 16. Oktober 2017, 20:54:36 CEST schrieb Daniel Borkmann: On 10/16/2017 08:18 PM, Richard Weinberger wrote: task is never used in bpf_get_current_uid_gid(), kill it. Signed-off-by: Richard Weinberger --- kernel/bpf/helpers.c | 1

Re: [PATCH 2/3] bpf: Remove dead variable

2017-10-16 Thread Daniel Borkmann
On 10/16/2017 08:18 PM, Richard Weinberger wrote: task is never used in bpf_get_current_uid_gid(), kill it. Signed-off-by: Richard Weinberger --- kernel/bpf/helpers.c | 1 - 1 file changed, 1 deletion(-) diff --git a/kernel/bpf/helpers.c b/kernel/bpf/helpers.c index

Re: [PATCH 2/3] bpf: Remove dead variable

2017-10-16 Thread Daniel Borkmann
On 10/16/2017 08:18 PM, Richard Weinberger wrote: task is never used in bpf_get_current_uid_gid(), kill it. Signed-off-by: Richard Weinberger --- kernel/bpf/helpers.c | 1 - 1 file changed, 1 deletion(-) diff --git a/kernel/bpf/helpers.c b/kernel/bpf/helpers.c index

Re: [PATCH] bpf: devmap: Check attr->max_entries more carefully

2017-10-16 Thread Daniel Borkmann
[ +Tejun, Mark, John ] On 10/16/2017 12:00 AM, Richard Weinberger wrote: max_entries is user controlled and used as input for __alloc_percpu(). This function expects that the allocation size is a power of two and less than PCPU_MIN_UNIT_SIZE. Otherwise a WARN() is triggered. Fixes:

Re: [PATCH] bpf: devmap: Check attr->max_entries more carefully

2017-10-16 Thread Daniel Borkmann
[ +Tejun, Mark, John ] On 10/16/2017 12:00 AM, Richard Weinberger wrote: max_entries is user controlled and used as input for __alloc_percpu(). This function expects that the allocation size is a power of two and less than PCPU_MIN_UNIT_SIZE. Otherwise a WARN() is triggered. Fixes:

Re: [PATCH] Add -target to clang switch while cross compiling.

2017-10-14 Thread Daniel Borkmann
get switch includes appropriate target specific files while cross compiling Tested on x86 and arm64. Signed-off-by: Abhijit Ayarekar <abhijit.ayare...@caviumnetworks.com> Acked-by: Daniel Borkmann <dan...@iogearbox.net>

Re: [PATCH] Add -target to clang switch while cross compiling.

2017-10-14 Thread Daniel Borkmann
get switch includes appropriate target specific files while cross compiling Tested on x86 and arm64. Signed-off-by: Abhijit Ayarekar Acked-by: Daniel Borkmann

Re: [PATCH][bpf-next] bpf: remove redundant variable old_flags

2017-10-11 Thread Daniel Borkmann
t;colin.k...@canonical.com> Acked-by: Daniel Borkmann <dan...@iogearbox.net>

Re: [PATCH][bpf-next] bpf: remove redundant variable old_flags

2017-10-11 Thread Daniel Borkmann
On 10/11/2017 12:56 PM, Colin King wrote: From: Colin Ian King Variable old_flags is being assigned but is never read; it is redundant and can be removed. Cleans up clang warning: Value stored to 'old_flags' is never read Signed-off-by: Colin Ian King Acked-by: Daniel Borkmann

Re: [PATCH] once: switch to new jump label API

2017-10-09 Thread Daniel Borkmann
On 10/09/2017 10:27 PM, Eric Biggers wrote: On Fri, Sep 15, 2017 at 09:07:51PM -0700, Eric Biggers wrote: On Tue, Aug 22, 2017 at 02:44:41PM -0400, Hannes Frederic Sowa wrote: Eric Biggers writes: From: Eric Biggers Switch the DO_ONCE() macro from

Re: [PATCH] once: switch to new jump label API

2017-10-09 Thread Daniel Borkmann
On 10/09/2017 10:27 PM, Eric Biggers wrote: On Fri, Sep 15, 2017 at 09:07:51PM -0700, Eric Biggers wrote: On Tue, Aug 22, 2017 at 02:44:41PM -0400, Hannes Frederic Sowa wrote: Eric Biggers writes: From: Eric Biggers Switch the DO_ONCE() macro from the deprecated jump label API to the new

Re: [PATCH 1/1] xdp: Sample xdp program implementing ip forward

2017-10-03 Thread Daniel Borkmann
On 10/03/2017 09:37 AM, cjacob wrote: Implements port to port forwarding with route table and arp table lookup for ipv4 packets using bpf_redirect helper function and lpm_trie map. Signed-off-by: cjacob Thanks for the patch, just few minor comments below! Note,

Re: [PATCH 1/1] xdp: Sample xdp program implementing ip forward

2017-10-03 Thread Daniel Borkmann
On 10/03/2017 09:37 AM, cjacob wrote: Implements port to port forwarding with route table and arp table lookup for ipv4 packets using bpf_redirect helper function and lpm_trie map. Signed-off-by: cjacob Thanks for the patch, just few minor comments below! Note, should be full name, e.g.:

Re: EBPF-triggered WARNING at mm/percpu.c:1361 in v4-14-rc2

2017-09-28 Thread Daniel Borkmann
On 09/28/2017 04:45 PM, Mark Rutland wrote: On Thu, Sep 28, 2017 at 04:37:46PM +0200, Daniel Borkmann wrote: On 09/28/2017 01:27 PM, Mark Rutland wrote: Hi, While fuzzing v4.14-rc2 with Syzkaller, I found it was possible to trigger the warning at mm/percpu.c:1361, on both arm64 and x86_64

Re: EBPF-triggered WARNING at mm/percpu.c:1361 in v4-14-rc2

2017-09-28 Thread Daniel Borkmann
On 09/28/2017 04:45 PM, Mark Rutland wrote: On Thu, Sep 28, 2017 at 04:37:46PM +0200, Daniel Borkmann wrote: On 09/28/2017 01:27 PM, Mark Rutland wrote: Hi, While fuzzing v4.14-rc2 with Syzkaller, I found it was possible to trigger the warning at mm/percpu.c:1361, on both arm64 and x86_64

Re: EBPF-triggered WARNING at mm/percpu.c:1361 in v4-14-rc2

2017-09-28 Thread Daniel Borkmann
On 09/28/2017 01:27 PM, Mark Rutland wrote: Hi, While fuzzing v4.14-rc2 with Syzkaller, I found it was possible to trigger the warning at mm/percpu.c:1361, on both arm64 and x86_64. This appears to require increasing RLIMIT_MEMLOCK, so to the best of my knowledge this cannot be triggered by an

Re: EBPF-triggered WARNING at mm/percpu.c:1361 in v4-14-rc2

2017-09-28 Thread Daniel Borkmann
On 09/28/2017 01:27 PM, Mark Rutland wrote: Hi, While fuzzing v4.14-rc2 with Syzkaller, I found it was possible to trigger the warning at mm/percpu.c:1361, on both arm64 and x86_64. This appears to require increasing RLIMIT_MEMLOCK, so to the best of my knowledge this cannot be triggered by an

Re: WARNING: kernel stack frame pointer at ffff880156a5fea0 in bash:2103 has bad value 00007ffec7d87e50

2017-09-26 Thread Daniel Borkmann
ore any warnings for this case. Reported-by: Daniel Borkmann <dan...@iogearbox.net> Reported-by: Dave Jones <da...@codemonkey.org.uk> Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> Acked-by: Thomas Gleixner <t...@linutronix.de> Cc: Andy Lutomirski <

Re: WARNING: kernel stack frame pointer at ffff880156a5fea0 in bash:2103 has bad value 00007ffec7d87e50

2017-09-26 Thread Daniel Borkmann
this case. Reported-by: Daniel Borkmann Reported-by: Dave Jones Signed-off-by: Josh Poimboeuf Acked-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra

Re: [PATCH v4 4/4] samples/bpf: Add documentation on cross compilation

2017-09-20 Thread Daniel Borkmann
On 09/20/2017 06:11 PM, Joel Fernandes wrote: Acked-by: Alexei Starovoitov <a...@kernel.org> Signed-off-by: Joel Fernandes <joe...@google.com> (Minor typo pointed out by Randy, but rest looks fine.) Acked-by: Daniel Borkmann <dan...@iogearbox.net>

Re: [PATCH v4 4/4] samples/bpf: Add documentation on cross compilation

2017-09-20 Thread Daniel Borkmann
On 09/20/2017 06:11 PM, Joel Fernandes wrote: Acked-by: Alexei Starovoitov Signed-off-by: Joel Fernandes (Minor typo pointed out by Randy, but rest looks fine.) Acked-by: Daniel Borkmann

Re: [PATCH v4 3/4] samples/bpf: Fix pt_regs issues when cross-compiling

2017-09-20 Thread Daniel Borkmann
s <joe...@google.com> Acked-by: Daniel Borkmann <dan...@iogearbox.net>

Re: [PATCH v4 3/4] samples/bpf: Fix pt_regs issues when cross-compiling

2017-09-20 Thread Daniel Borkmann
make assumptions about what target the BPF program is going to run on. To fix this, lets pass ARCH so the header knows which target the BPF program is being compiled for and can use the correct pt_regs code. Acked-by: Alexei Starovoitov Signed-off-by: Joel Fernandes Acked-by: Daniel Borkmann

Re: [PATCH v4 2/4] samples/bpf: Enable cross compiler support

2017-09-20 Thread Daniel Borkmann
this and compile samples correctly. Acked-by: Alexei Starovoitov <a...@kernel.org> Signed-off-by: Joel Fernandes <joe...@google.com> Acked-by: Daniel Borkmann <dan...@iogearbox.net>

Re: [PATCH v4 2/4] samples/bpf: Enable cross compiler support

2017-09-20 Thread Daniel Borkmann
this and compile samples correctly. Acked-by: Alexei Starovoitov Signed-off-by: Joel Fernandes Acked-by: Daniel Borkmann

Re: [PATCH v4 1/4] samples/bpf: Use getppid instead of getpgrp for array map stress

2017-09-20 Thread Daniel Borkmann
a different syscall (getppid) for the array map stress test. Acked-by: Alexei Starovoitov <a...@kernel.org> Signed-off-by: Joel Fernandes <joe...@google.com> Acked-by: Daniel Borkmann <dan...@iogearbox.net>

Re: [PATCH v4 1/4] samples/bpf: Use getppid instead of getpgrp for array map stress

2017-09-20 Thread Daniel Borkmann
a different syscall (getppid) for the array map stress test. Acked-by: Alexei Starovoitov Signed-off-by: Joel Fernandes Acked-by: Daniel Borkmann

Re: selftests/bpf doesn't compile

2017-09-18 Thread Daniel Borkmann
On 09/16/2017 12:41 AM, Shuah Khan wrote: On 09/15/2017 12:48 PM, Daniel Borkmann wrote: On 09/15/2017 08:23 PM, Daniel Borkmann wrote: On 09/15/2017 08:07 PM, Alexei Starovoitov wrote: On Fri, Sep 15, 2017 at 05:58:40PM +0100, Edward Cree wrote: On 15/09/17 17:02, Alexei Starovoitov wrote

Re: selftests/bpf doesn't compile

2017-09-18 Thread Daniel Borkmann
On 09/16/2017 12:41 AM, Shuah Khan wrote: On 09/15/2017 12:48 PM, Daniel Borkmann wrote: On 09/15/2017 08:23 PM, Daniel Borkmann wrote: On 09/15/2017 08:07 PM, Alexei Starovoitov wrote: On Fri, Sep 15, 2017 at 05:58:40PM +0100, Edward Cree wrote: On 15/09/17 17:02, Alexei Starovoitov wrote

Re: selftests/bpf doesn't compile

2017-09-15 Thread Daniel Borkmann
On 09/15/2017 08:23 PM, Daniel Borkmann wrote: On 09/15/2017 08:07 PM, Alexei Starovoitov wrote: On Fri, Sep 15, 2017 at 05:58:40PM +0100, Edward Cree wrote: On 15/09/17 17:02, Alexei Starovoitov wrote: On Thu, Sep 14, 2017 at 09:33:48AM -0600, Shuah Khan wrote: Is bpf test intended

Re: selftests/bpf doesn't compile

2017-09-15 Thread Daniel Borkmann
On 09/15/2017 08:23 PM, Daniel Borkmann wrote: On 09/15/2017 08:07 PM, Alexei Starovoitov wrote: On Fri, Sep 15, 2017 at 05:58:40PM +0100, Edward Cree wrote: On 15/09/17 17:02, Alexei Starovoitov wrote: On Thu, Sep 14, 2017 at 09:33:48AM -0600, Shuah Khan wrote: Is bpf test intended

Re: selftests/bpf doesn't compile

2017-09-15 Thread Daniel Borkmann
On 09/15/2017 08:07 PM, Alexei Starovoitov wrote: On Fri, Sep 15, 2017 at 05:58:40PM +0100, Edward Cree wrote: On 15/09/17 17:02, Alexei Starovoitov wrote: On Thu, Sep 14, 2017 at 09:33:48AM -0600, Shuah Khan wrote: Is bpf test intended to be run in kselftest run? The clang dependency might

Re: selftests/bpf doesn't compile

2017-09-15 Thread Daniel Borkmann
On 09/15/2017 08:07 PM, Alexei Starovoitov wrote: On Fri, Sep 15, 2017 at 05:58:40PM +0100, Edward Cree wrote: On 15/09/17 17:02, Alexei Starovoitov wrote: On Thu, Sep 14, 2017 at 09:33:48AM -0600, Shuah Khan wrote: Is bpf test intended to be run in kselftest run? The clang dependency might

Re: [PATCH] selftests/bpf: Make bpf_util work on uniprocessor systems

2017-09-08 Thread Daniel Borkmann
Thanks for the fix. lgtm Acked-by: Alexei Starovoitov <a...@kernel.org> Looks good from here as well: Acked-by: Daniel Borkmann <dan...@iogearbox.net> This time it's ok to go via selftest tree, but next time please use net-next/net to avoid conflicts. +1 Thanks --- tools/tes

Re: [PATCH] selftests/bpf: Make bpf_util work on uniprocessor systems

2017-09-08 Thread Daniel Borkmann
-by: Alexei Starovoitov Looks good from here as well: Acked-by: Daniel Borkmann This time it's ok to go via selftest tree, but next time please use net-next/net to avoid conflicts. +1 Thanks --- tools/testing/selftests/bpf/bpf_util.h | 17 + 1 file changed, 9 insertions

Re: [PATCH v2 2/2] selftests: bpf: test_kmod.sh: use modprobe on target device

2017-09-07 Thread Daniel Borkmann
der /lib/modules/`uname -r`/kernel/lib/ so use modprobe dry run to check for missing test_bpf.ko module and insert for testing. Signed-off-by: Naresh Kamboju <naresh.kamb...@linaro.org> Acked-by: Daniel Borkmann <dan...@iogearbox.net> One really small nit that could probably be

Re: [PATCH v2 2/2] selftests: bpf: test_kmod.sh: use modprobe on target device

2017-09-07 Thread Daniel Borkmann
el/lib/ so use modprobe dry run to check for missing test_bpf.ko module and insert for testing. Signed-off-by: Naresh Kamboju Acked-by: Daniel Borkmann One really small nit that could probably be fixed up along the way when applying: --- tools/testing/selftests/bpf/test_kmod.sh | 10 +

Re: [PATCH v2 1/2] selftests: bpf: test_kmod.sh: check if module is present in the path before insert

2017-09-07 Thread Daniel Borkmann
cases along the BPF patches. Given the merge window now and given one can regard it as a fix, it's net tree. I'm also ok if Shuah wants to pick it up this window as test_kmod.sh hasn't been changed in quite a while, so no merge conflicts expected. Anyway, for the patch: Acked-by: Daniel B

Re: [PATCH v2 1/2] selftests: bpf: test_kmod.sh: check if module is present in the path before insert

2017-09-07 Thread Daniel Borkmann
can regard it as a fix, it's net tree. I'm also ok if Shuah wants to pick it up this window as test_kmod.sh hasn't been changed in quite a while, so no merge conflicts expected. Anyway, for the patch: Acked-by: Daniel Borkmann Thanks! --- tools/testing/selftests/bpf/test_kmod.sh | 8

Re: [PATCH][net-next][V3] bpf: test_maps: fix typos, "conenct" and "listeen"

2017-08-30 Thread Daniel Borkmann
On 08/30/2017 10:13 PM, Shuah Khan wrote: On 08/30/2017 12:47 PM, Daniel Borkmann wrote: On 08/30/2017 07:15 PM, Colin King wrote: From: Colin Ian King <colin.k...@canonical.com> Trivial fix to typos in printf error messages: "conenct" -> "connect" "list

Re: [PATCH][net-next][V3] bpf: test_maps: fix typos, "conenct" and "listeen"

2017-08-30 Thread Daniel Borkmann
On 08/30/2017 10:13 PM, Shuah Khan wrote: On 08/30/2017 12:47 PM, Daniel Borkmann wrote: On 08/30/2017 07:15 PM, Colin King wrote: From: Colin Ian King Trivial fix to typos in printf error messages: "conenct" -> "connect" "listeen" -> "listen&quo

Re: [PATCH][net-next][V3] bpf: test_maps: fix typos, "conenct" and "listeen"

2017-08-30 Thread Daniel Borkmann
On 08/30/2017 07:15 PM, Colin King wrote: From: Colin Ian King <colin.k...@canonical.com> Trivial fix to typos in printf error messages: "conenct" -> "connect" "listeen" -> "listen" thanks to Daniel Borkmann for spotting one of th

Re: [PATCH][net-next][V3] bpf: test_maps: fix typos, "conenct" and "listeen"

2017-08-30 Thread Daniel Borkmann
On 08/30/2017 07:15 PM, Colin King wrote: From: Colin Ian King Trivial fix to typos in printf error messages: "conenct" -> "connect" "listeen" -> "listen" thanks to Daniel Borkmann for spotting one of these mistakes Signed-off-by: Colin Ian King Acked-by: Daniel Borkmann

Re: [PATCH][next][V2] bpf: test_maps: fix typo "conenct" -> "connect"

2017-08-30 Thread Daniel Borkmann
o fix this one as well ? ;) Acked-by: Daniel Borkmann <dan...@iogearbox.net>

Re: [PATCH][next][V2] bpf: test_maps: fix typo "conenct" -> "connect"

2017-08-30 Thread Daniel Borkmann
On 08/30/2017 01:47 PM, Colin King wrote: From: Colin Ian King Trivial fix to typo in printf error message Signed-off-by: Colin Ian King For net-next; looks like there is also one in "failed to listeen\n". Want to fix this one as well ? ;) Acked-by: Daniel Borkmann

Re: [PATCH][next] MIPS,bpf: fix missing break in switch statement

2017-08-22 Thread Daniel Borkmann
On 08/23/2017 12:29 AM, David Daney wrote: On 08/22/2017 03:03 PM, Colin King wrote: From: Colin Ian King There is a missing break causing a fall-through and setting ctx.use_bbit_insns to the wrong value. Fix this by adding the missing break. Detected with cppcheck:

Re: [PATCH][next] MIPS,bpf: fix missing break in switch statement

2017-08-22 Thread Daniel Borkmann
On 08/23/2017 12:29 AM, David Daney wrote: On 08/22/2017 03:03 PM, Colin King wrote: From: Colin Ian King There is a missing break causing a fall-through and setting ctx.use_bbit_insns to the wrong value. Fix this by adding the missing break. Detected with cppcheck: "Variable

Re: [PATCH v4 net-next] arm: eBPF JIT compiler

2017-08-22 Thread Daniel Borkmann
On 08/22/2017 05:08 PM, Daniel Borkmann wrote: On 08/22/2017 08:36 AM, Shubham Bansal wrote: [...] + +static int out_offset = -1; /* initialized on the first pass of build_body() */ Hm, why is this a global var actually? There can be multiple parallel calls to bpf_int_jit_compile(), we don't

Re: [PATCH v4 net-next] arm: eBPF JIT compiler

2017-08-22 Thread Daniel Borkmann
On 08/22/2017 05:08 PM, Daniel Borkmann wrote: On 08/22/2017 08:36 AM, Shubham Bansal wrote: [...] + +static int out_offset = -1; /* initialized on the first pass of build_body() */ Hm, why is this a global var actually? There can be multiple parallel calls to bpf_int_jit_compile(), we don't

Re: [PATCH v4 net-next] arm: eBPF JIT compiler

2017-08-22 Thread Daniel Borkmann
On 08/22/2017 08:36 AM, Shubham Bansal wrote: [...] + +static int out_offset = -1; /* initialized on the first pass of build_body() */ Hm, why is this a global var actually? There can be multiple parallel calls to bpf_int_jit_compile(), we don't take a global lock on this. Unless I'm missing

Re: [PATCH v4 net-next] arm: eBPF JIT compiler

2017-08-22 Thread Daniel Borkmann
On 08/22/2017 08:36 AM, Shubham Bansal wrote: [...] + +static int out_offset = -1; /* initialized on the first pass of build_body() */ Hm, why is this a global var actually? There can be multiple parallel calls to bpf_int_jit_compile(), we don't take a global lock on this. Unless I'm missing

Re: [PATCH v3 net-next] bpf/verifier: track liveness for pruning

2017-08-21 Thread Daniel Borkmann
On 08/21/2017 10:44 PM, Edward Cree wrote: On 21/08/17 21:27, Daniel Borkmann wrote: On 08/21/2017 08:36 PM, Edward Cree wrote: On 19/08/17 00:37, Alexei Starovoitov wrote: [...] I'm tempted to just rip out env->varlen_map_value_access and always check the whole thing, because honestl

Re: [PATCH v3 net-next] bpf/verifier: track liveness for pruning

2017-08-21 Thread Daniel Borkmann
On 08/21/2017 10:44 PM, Edward Cree wrote: On 21/08/17 21:27, Daniel Borkmann wrote: On 08/21/2017 08:36 PM, Edward Cree wrote: On 19/08/17 00:37, Alexei Starovoitov wrote: [...] I'm tempted to just rip out env->varlen_map_value_access and always check the whole thing, because honestl

Re: [PATCH v3 net-next] bpf/verifier: track liveness for pruning

2017-08-21 Thread Daniel Borkmann
On 08/21/2017 08:36 PM, Edward Cree wrote: On 19/08/17 00:37, Alexei Starovoitov wrote: [...] I'm tempted to just rip out env->varlen_map_value_access and always check the whole thing, because honestly I don't know what it was meant to do originally or how it can ever do any useful

Re: [PATCH v3 net-next] bpf/verifier: track liveness for pruning

2017-08-21 Thread Daniel Borkmann
On 08/21/2017 08:36 PM, Edward Cree wrote: On 19/08/17 00:37, Alexei Starovoitov wrote: [...] I'm tempted to just rip out env->varlen_map_value_access and always check the whole thing, because honestly I don't know what it was meant to do originally or how it can ever do any useful

Re: [PATCH 0/3] MIPS,bpf: Improvements for MIPS eBPF JIT

2017-08-21 Thread Daniel Borkmann
On 08/21/2017 05:06 AM, David Miller wrote: From: David Daney Date: Fri, 18 Aug 2017 16:40:30 -0700 I suggest that the whole thing go via the BPF/net-next path as there are dependencies on code that is not yet merged to Linus' tree. What kind of dependency? On

Re: [PATCH 0/3] MIPS,bpf: Improvements for MIPS eBPF JIT

2017-08-21 Thread Daniel Borkmann
On 08/21/2017 05:06 AM, David Miller wrote: From: David Daney Date: Fri, 18 Aug 2017 16:40:30 -0700 I suggest that the whole thing go via the BPF/net-next path as there are dependencies on code that is not yet merged to Linus' tree. What kind of dependency? On networking or MIPS changes?

Re: [PATCH net-next v3] arm: eBPF JIT compiler

2017-08-20 Thread Daniel Borkmann
On 08/19/2017 11:20 AM, Shubham Bansal wrote: [...] diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 61a0cb1..cc31f8b 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -50,7 +50,7 @@ config ARM select HAVE_ARCH_SECCOMP_FILTER if (AEABI && !OABI_COMPAT) select

Re: [PATCH net-next v3] arm: eBPF JIT compiler

2017-08-20 Thread Daniel Borkmann
On 08/19/2017 11:20 AM, Shubham Bansal wrote: [...] diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 61a0cb1..cc31f8b 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -50,7 +50,7 @@ config ARM select HAVE_ARCH_SECCOMP_FILTER if (AEABI && !OABI_COMPAT) select

Re: [PATCH 0/3] MIPS,bpf: Improvements for MIPS eBPF JIT

2017-08-18 Thread Daniel Borkmann
On 08/19/2017 01:40 AM, David Daney wrote: Here are several improvements and bug fixes for the MIPS eBPF JIT. The main change is the addition of support for JLT, JLE, JSLT and JSLE ops, that were recently added. Also fix WARN output when used with preemptable kernel, and a small

Re: [PATCH 0/3] MIPS,bpf: Improvements for MIPS eBPF JIT

2017-08-18 Thread Daniel Borkmann
On 08/19/2017 01:40 AM, David Daney wrote: Here are several improvements and bug fixes for the MIPS eBPF JIT. The main change is the addition of support for JLT, JLE, JSLT and JSLE ops, that were recently added. Also fix WARN output when used with preemptable kernel, and a small

Re: [PATCH v2] bpf: Update sysctl documentation to list all supported architectures

2017-08-17 Thread Daniel Borkmann
). Signed-off-by: Michael Ellerman <m...@ellerman.id.au> The last paragraph speaking about tcpdump, I can take care of later, also given the patch is about updating list of archs, so lgtm, thanks! Acked-by: Daniel Borkmann <dan...@iogearbox.net>

Re: [PATCH v2] bpf: Update sysctl documentation to list all supported architectures

2017-08-17 Thread Daniel Borkmann
). Signed-off-by: Michael Ellerman The last paragraph speaking about tcpdump, I can take care of later, also given the patch is about updating list of archs, so lgtm, thanks! Acked-by: Daniel Borkmann

Re: [PATCH] bpf: Update sysctl documentation to list all supported architectures

2017-08-16 Thread Daniel Borkmann
On 08/16/2017 01:10 PM, Michael Ellerman wrote: Daniel Borkmann <dan...@iogearbox.net> writes: On 08/16/2017 07:15 AM, Michael Ellerman wrote: The sysctl documentation states that the JIT is only available on x86_64, which is no longer correct. Update the list to include all archite

Re: [PATCH] bpf: Update sysctl documentation to list all supported architectures

2017-08-16 Thread Daniel Borkmann
On 08/16/2017 01:10 PM, Michael Ellerman wrote: Daniel Borkmann writes: On 08/16/2017 07:15 AM, Michael Ellerman wrote: The sysctl documentation states that the JIT is only available on x86_64, which is no longer correct. Update the list to include all architectures that enable HAVE_CBPF_JIT

Re: [PATCH] bpf: Update sysctl documentation to list all supported architectures

2017-08-16 Thread Daniel Borkmann
Hi Michael, On 08/16/2017 07:15 AM, Michael Ellerman wrote: The sysctl documentation states that the JIT is only available on x86_64, which is no longer correct. Update the list to include all architectures that enable HAVE_CBPF_JIT or HAVE_EBPF_JIT under some configuration. Signed-off-by:

Re: [PATCH] bpf: Update sysctl documentation to list all supported architectures

2017-08-16 Thread Daniel Borkmann
Hi Michael, On 08/16/2017 07:15 AM, Michael Ellerman wrote: The sysctl documentation states that the JIT is only available on x86_64, which is no longer correct. Update the list to include all architectures that enable HAVE_CBPF_JIT or HAVE_EBPF_JIT under some configuration. Signed-off-by:

Re: [PATCH v3 net-next] bpf/verifier: track liveness for pruning

2017-08-15 Thread Daniel Borkmann
bpf_lxc_opt_-DUNKNOWN.o1768234 bpf_netdev.o 62 31 bpf_overlay.o15 13 Signed-off-by: Edward Cree <ec...@solarflare.com> Acked-by: Daniel Borkmann <dan...@iogearbox.net>

Re: [PATCH v3 net-next] bpf/verifier: track liveness for pruning

2017-08-15 Thread Daniel Borkmann
bpf_lxc_opt_-DUNKNOWN.o1768234 bpf_netdev.o 62 31 bpf_overlay.o15 13 Signed-off-by: Edward Cree Acked-by: Daniel Borkmann

Re: [PATCH v2 net-next] bpf/verifier: track liveness for pruning

2017-08-15 Thread Daniel Borkmann
On 08/15/2017 03:53 PM, Edward Cree wrote: State of a register doesn't matter if it wasn't read in reaching an exit; a write screens off all reads downstream of it from all explored_states upstream of it. This allows us to prune many more branches; here are some processed insn counts for

Re: [PATCH v2 net-next] bpf/verifier: track liveness for pruning

2017-08-15 Thread Daniel Borkmann
On 08/15/2017 03:53 PM, Edward Cree wrote: State of a register doesn't matter if it wasn't read in reaching an exit; a write screens off all reads downstream of it from all explored_states upstream of it. This allows us to prune many more branches; here are some processed insn counts for

Re: [PATCH net-next] bpf/verifier: track liveness for pruning

2017-08-15 Thread Daniel Borkmann
On 08/14/2017 07:55 PM, Edward Cree wrote: State of a register doesn't matter if it wasn't read in reaching an exit; a write screens off all reads downstream of it from all explored_states upstream of it. This allows us to prune many more branches; here are some processed insn counts for

Re: [PATCH net-next] bpf/verifier: track liveness for pruning

2017-08-15 Thread Daniel Borkmann
On 08/14/2017 07:55 PM, Edward Cree wrote: State of a register doesn't matter if it wasn't read in reaching an exit; a write screens off all reads downstream of it from all explored_states upstream of it. This allows us to prune many more branches; here are some processed insn counts for

Re: [PATCH net-next V2 3/3] tap: XDP support

2017-08-14 Thread Daniel Borkmann
On 08/11/2017 01:41 PM, Jason Wang wrote: This patch tries to implement XDP for tun. The implementation was split into two parts: [...] @@ -1402,6 +1521,22 @@ static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile, skb_reset_network_header(skb);

Re: [PATCH net-next V2 3/3] tap: XDP support

2017-08-14 Thread Daniel Borkmann
On 08/11/2017 01:41 PM, Jason Wang wrote: This patch tries to implement XDP for tun. The implementation was split into two parts: [...] @@ -1402,6 +1521,22 @@ static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile, skb_reset_network_header(skb);

Re: [RFC PATCH 2/2] bpf: Initialise mod[] in bpf_trace_printk

2017-08-11 Thread Daniel Borkmann
Hi James, On 08/09/2017 10:34 PM, Daniel Borkmann wrote: On 08/09/2017 09:39 AM, James Hogan wrote: [...] time (but please consider looking at the other patch which is certainly a more real issue). Sorry for the delay, started looking into that and whether we have some other options, I'll

Re: [RFC PATCH 2/2] bpf: Initialise mod[] in bpf_trace_printk

2017-08-11 Thread Daniel Borkmann
Hi James, On 08/09/2017 10:34 PM, Daniel Borkmann wrote: On 08/09/2017 09:39 AM, James Hogan wrote: [...] time (but please consider looking at the other patch which is certainly a more real issue). Sorry for the delay, started looking into that and whether we have some other options, I'll

Re: [RFC PATCH 2/2] bpf: Initialise mod[] in bpf_trace_printk

2017-08-09 Thread Daniel Borkmann
On 08/09/2017 09:39 AM, James Hogan wrote: [...] time (but please consider looking at the other patch which is certainly a more real issue). Sorry for the delay, started looking into that and whether we have some other options, I'll get back to you on this. Thanks, Daniel

<    3   4   5   6   7   8   9   10   11   12   >