Re: [PATCH v2 bpf-next] bpf: sk_storage: Fix out of bounds memory access

2019-06-16 Thread Arthur Fabre
On Sat, Jun 15, 2019 at 10:45 PM Alexei Starovoitov wrote: > It's certainly should be in bpf tree. > It didn't apply directly, so I tweaked it a tiny bit, > reduced verbosity of commit log and pushed to bpf tree. > Thanks for the fix! Thanks! I didn't realize this had already made it to the bpf t

Re: [PATCH v2 bpf-next] bpf: sk_storage: Fix out of bounds memory access

2019-06-15 Thread Alexei Starovoitov
On Fri, Jun 14, 2019 at 3:36 PM Daniel Borkmann wrote: > > > >> Force the minimum number of locks to two. > >> > >> Signed-off-by: Arthur Fabre > >> Fixes: 6ac99e8f23d4 ("bpf: Introduce bpf sk local storage") > > The offending commit is already in Linus tree hence if so bpf tree. Arthur, > pleas

Re: [PATCH v2 bpf-next] bpf: sk_storage: Fix out of bounds memory access

2019-06-14 Thread Daniel Borkmann
On 06/15/2019 12:31 AM, Andrii Nakryiko wrote: > On Fri, Jun 14, 2019 at 2:45 AM Arthur Fabre wrote: >> >> bpf_sk_storage maps use multiple spin locks to reduce contention. >> The number of locks to use is determined by the number of possible CPUs. >> With only 1 possible CPU, bucket_log == 0, and

Re: [PATCH v2 bpf-next] bpf: sk_storage: Fix out of bounds memory access

2019-06-14 Thread Andrii Nakryiko
On Fri, Jun 14, 2019 at 2:45 AM Arthur Fabre wrote: > > bpf_sk_storage maps use multiple spin locks to reduce contention. > The number of locks to use is determined by the number of possible CPUs. > With only 1 possible CPU, bucket_log == 0, and 2^0 = 1 locks are used. > > When updating elements,