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

2013-10-03 Thread Alexei Starovoitov
On Wed, Oct 2, 2013 at 9:57 PM, Eric Dumazet wrote: > On Wed, 2013-10-02 at 21:53 -0700, Eric Dumazet wrote: >> On Wed, 2013-10-02 at 21:44 -0700, Alexei Starovoitov wrote: >> >> > I think ifdef config_x86 is a bit ugly inside struct sk_filter, but >> > don't mind whichever way. >> >> Its not

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

2013-10-03 Thread Alexei Starovoitov
On Wed, Oct 2, 2013 at 9:57 PM, Eric Dumazet eric.duma...@gmail.com wrote: On Wed, 2013-10-02 at 21:53 -0700, Eric Dumazet wrote: On Wed, 2013-10-02 at 21:44 -0700, Alexei Starovoitov wrote: I think ifdef config_x86 is a bit ugly inside struct sk_filter, but don't mind whichever way. Its

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

2013-10-02 Thread Eric Dumazet
On Wed, 2013-10-02 at 21:53 -0700, Eric Dumazet wrote: > On Wed, 2013-10-02 at 21:44 -0700, Alexei Starovoitov wrote: > > > I think ifdef config_x86 is a bit ugly inside struct sk_filter, but > > don't mind whichever way. > > Its not fair to make sk_filter bigger, because it means that simple

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

2013-10-02 Thread Eric Dumazet
On Wed, 2013-10-02 at 21:44 -0700, Alexei Starovoitov wrote: > I think ifdef config_x86 is a bit ugly inside struct sk_filter, but > don't mind whichever way. Its not fair to make sk_filter bigger, because it means that simple (non JIT) filter might need an extra cache line. You could

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

2013-10-02 Thread Alexei Starovoitov
On Wed, Oct 2, 2013 at 9:23 PM, Eric Dumazet wrote: > On Wed, 2013-10-02 at 20:50 -0700, Alexei Starovoitov wrote: >> on x86 system with net.core.bpf_jit_enable = 1 > >> diff --git a/include/linux/filter.h b/include/linux/filter.h >> index a6ac848..378fa03 100644 >> --- a/include/linux/filter.h

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

2013-10-02 Thread Eric Dumazet
On Wed, 2013-10-02 at 20:50 -0700, Alexei Starovoitov wrote: > on x86 system with net.core.bpf_jit_enable = 1 > diff --git a/include/linux/filter.h b/include/linux/filter.h > index a6ac848..378fa03 100644 > --- a/include/linux/filter.h > +++ b/include/linux/filter.h > @@ -27,6 +27,7 @@ struct

[PATCH net-next] fix unsafe set_memory_rw from softirq

2013-10-02 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(&(>lock)->rlock); [ 56.799593] [ 56.805889]

[PATCH net-next] fix unsafe set_memory_rw from softirq

2013-10-02 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 net-next] fix unsafe set_memory_rw from softirq

2013-10-02 Thread Eric Dumazet
On Wed, 2013-10-02 at 20:50 -0700, Alexei Starovoitov wrote: on x86 system with net.core.bpf_jit_enable = 1 diff --git a/include/linux/filter.h b/include/linux/filter.h index a6ac848..378fa03 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h @@ -27,6 +27,7 @@ struct sk_filter

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

2013-10-02 Thread Alexei Starovoitov
On Wed, Oct 2, 2013 at 9:23 PM, Eric Dumazet eric.duma...@gmail.com wrote: On Wed, 2013-10-02 at 20:50 -0700, Alexei Starovoitov wrote: on x86 system with net.core.bpf_jit_enable = 1 diff --git a/include/linux/filter.h b/include/linux/filter.h index a6ac848..378fa03 100644 ---

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

2013-10-02 Thread Eric Dumazet
On Wed, 2013-10-02 at 21:44 -0700, Alexei Starovoitov wrote: I think ifdef config_x86 is a bit ugly inside struct sk_filter, but don't mind whichever way. Its not fair to make sk_filter bigger, because it means that simple (non JIT) filter might need an extra cache line. You could presumably

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

2013-10-02 Thread Eric Dumazet
On Wed, 2013-10-02 at 21:53 -0700, Eric Dumazet wrote: On Wed, 2013-10-02 at 21:44 -0700, Alexei Starovoitov wrote: I think ifdef config_x86 is a bit ugly inside struct sk_filter, but don't mind whichever way. Its not fair to make sk_filter bigger, because it means that simple (non JIT)