Re: [PATCH 1/2] bpf: Do not dereference user pointer in bpf_test_finish().

2017-05-02 Thread Daniel Borkmann
On 05/02/2017 05:36 PM, David Miller wrote: Instead, pass the kattr in which has a kernel side copy of this data structure from userspace already. Fix based upon a suggestion from Alexei Starovoitov. Signed-off-by: David S. Miller Acked-by: Daniel Borkmann

[PATCH 1/2] bpf: Do not dereference user pointer in bpf_test_finish().

2017-05-02 Thread David Miller
etions(-) diff --git a/net/bpf/test_run.c b/net/bpf/test_run.c index 8a6d0a3..f946912 100644 --- a/net/bpf/test_run.c +++ b/net/bpf/test_run.c @@ -49,10 +49,11 @@ static u32 bpf_test_run(struct bpf_prog *prog, void *ctx, u32 repeat, u32 *time) return ret; } -static int bpf_test_finish

Re: bpf_test_finish()

2017-05-02 Thread David Miller
re and > passed into bpf_test_finish(). I happen to be hacking on this file for another reason right now so I'll work on a fix for this. So don't worry about it.

Re: bpf_test_finish()

2017-05-01 Thread Alexei Starovoitov
On 5/1/17 8:56 PM, David Miller wrote: It dereferences a user pointer: static int bpf_test_finish(union bpf_attr __user *uattr, const void *data, u32 size, u32 retval, u32 duration) { void __user *data_out = u64_to_user_ptr(uattr->test.data_

bpf_test_finish()

2017-05-01 Thread David Miller
It dereferences a user pointer: static int bpf_test_finish(union bpf_attr __user *uattr, const void *data, u32 size, u32 retval, u32 duration) { void __user *data_out = u64_to_user_ptr(uattr->test.data_