Re: [PATCH v3 net-next] fix unsafe set_memory_rw from softirq

2013-10-04 Thread Heiko Carstens
On Thu, Oct 03, 2013 at 07:24:06PM -0700, Alexei Starovoitov wrote: diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c index 7092392..a5df511 100644 --- a/arch/s390/net/bpf_jit_comp.c +++ b/arch/s390/net/bpf_jit_comp.c @@ -881,7 +881,9 @@ void bpf_jit_free(struct

Re: [PATCH v3 net-next] fix unsafe set_memory_rw from softirq

2013-10-04 Thread Ingo Molnar
* Alexei Starovoitov a...@plumgrid.com wrote: on x86 system with net.core.bpf_jit_enable = 1 sudo tcpdump -i eth1 'tcp port 22' causes the warning: [ 56.766097] Possible unsafe locking scenario: [ 56.766097] [ 56.780146]CPU0 [ 56.786807] [ 56.793188]

Re: [PATCH v3 net-next] fix unsafe set_memory_rw from softirq

2013-10-04 Thread Ingo Molnar
* Eric Dumazet eduma...@google.com wrote: 1) I took a brief look at arch/x86/net/bpf_jit_comp.c while reviewing this patch. You need to split up bpf_jit_compile(), it's an obscenely large, ~600 lines long function. We don't do that in modern, maintainable kernel code. 2)

Re: [PATCH v3 net-next] fix unsafe set_memory_rw from softirq

2013-10-04 Thread Ingo Molnar
* Alexei Starovoitov a...@plumgrid.com wrote: #else +#include linux/slab.h Inlines in the middle of header files are generally frowned upon. The standard pattern is to put them at the top, that way it's easier to see the dependencies and there's also less .config dependent

Re: [PATCH v3 net-next] fix unsafe set_memory_rw from softirq

2013-10-04 Thread Alexei Starovoitov
On Thu, Oct 3, 2013 at 10:16 PM, Eric Dumazet eric.duma...@gmail.com wrote: On Thu, 2013-10-03 at 21:11 -0700, Alexei Starovoitov wrote: -static inline unsigned int sk_filter_len(const struct sk_filter *fp) +static inline unsigned int sk_filter_size(const struct sk_filter *fp, +

[PATCH v3 net-next] fix unsafe set_memory_rw from softirq

2013-10-04 Thread Alexei Starovoitov
on x86 system with net.core.bpf_jit_enable = 1 sudo tcpdump -i eth1 'tcp port 22' causes the warning: [ 56.766097] Possible unsafe locking scenario: [ 56.766097] [ 56.780146]CPU0 [ 56.786807] [ 56.793188] lock((vb-lock)-rlock); [ 56.799593] Interrupt [

[PATCH v3 net-next] fix unsafe set_memory_rw from softirq

2013-10-04 Thread Alexei Starovoitov
on x86 system with net.core.bpf_jit_enable = 1 sudo tcpdump -i eth1 'tcp port 22' causes the warning: [ 56.766097] Possible unsafe locking scenario: [ 56.766097] [ 56.780146]CPU0 [ 56.786807] [ 56.793188] lock((vb-lock)-rlock); [ 56.799593] Interrupt [

Re: [PATCH v3 net-next] fix unsafe set_memory_rw from softirq

2013-10-03 Thread Eric Dumazet
On Thu, 2013-10-03 at 21:11 -0700, Alexei Starovoitov wrote: diff --git a/include/linux/filter.h b/include/linux/filter.h index a6ac848..5d66cd9 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h @@ -25,15 +25,20 @@ struct sk_filter { atomic_trefcnt;