Re: [PATCH net] bpf: rather use get_random_int for randomizations

2016-05-20 Thread David Miller
From: Daniel Borkmann Date: Wed, 18 May 2016 14:14:28 +0200 > Start address randomization and blinding in BPF currently use > prandom_u32(). prandom_u32() values are not exposed to unpriviledged > user space to my knowledge, but given other kernel facilities such as > ASLR, stack canaries, etc ma

Re: [PATCH net] bpf: rather use get_random_int for randomizations

2016-05-18 Thread Alexei Starovoitov
On Wed, May 18, 2016 at 07:17:48AM -0700, Eric Dumazet wrote: > On Wed, 2016-05-18 at 15:28 +0200, Hannes Frederic Sowa wrote: > > > I don't consider this a big thing, I just mentioned that we probably > > shouldn't use prandom_u32 if the value somehow could leak to user space > > and should be us

Re: [PATCH net] bpf: rather use get_random_int for randomizations

2016-05-18 Thread Eric Dumazet
On Wed, 2016-05-18 at 15:28 +0200, Hannes Frederic Sowa wrote: > I don't consider this a big thing, I just mentioned that we probably > shouldn't use prandom_u32 if the value somehow could leak to user space > and should be used for security. Yes, I was mostly trying to understand if you had real

Re: [PATCH net] bpf: rather use get_random_int for randomizations

2016-05-18 Thread Daniel Borkmann
On 05/18/2016 03:28 PM, Hannes Frederic Sowa wrote: On 18.05.2016 15:20, Eric Dumazet wrote: On Wed, 2016-05-18 at 14:14 +0200, Daniel Borkmann wrote: Start address randomization and blinding in BPF currently use prandom_u32(). prandom_u32() values are not exposed to unpriviledged user space to

Re: [PATCH net] bpf: rather use get_random_int for randomizations

2016-05-18 Thread Hannes Frederic Sowa
On 18.05.2016 15:20, Eric Dumazet wrote: > On Wed, 2016-05-18 at 14:14 +0200, Daniel Borkmann wrote: >> Start address randomization and blinding in BPF currently use >> prandom_u32(). prandom_u32() values are not exposed to unpriviledged >> user space to my knowledge, but given other kernel facilit

Re: [PATCH net] bpf: rather use get_random_int for randomizations

2016-05-18 Thread Eric Dumazet
On Wed, 2016-05-18 at 14:14 +0200, Daniel Borkmann wrote: > Start address randomization and blinding in BPF currently use > prandom_u32(). prandom_u32() values are not exposed to unpriviledged > user space to my knowledge, but given other kernel facilities such as > ASLR, stack canaries, etc make u

[PATCH net] bpf: rather use get_random_int for randomizations

2016-05-18 Thread Daniel Borkmann
Start address randomization and blinding in BPF currently use prandom_u32(). prandom_u32() values are not exposed to unpriviledged user space to my knowledge, but given other kernel facilities such as ASLR, stack canaries, etc make use of stronger get_random_int(), we better make use of it here as