Re: [PATCH net] bpf: don't let ldimm64 leak map addresses on unprivileged

2017-05-08 Thread David Miller
From: Daniel Borkmann Date: Mon, 8 May 2017 00:04:09 +0200 > The patch fixes two things at once: > > 1) It checks the env->allow_ptr_leaks and only prints the map address to >the log if we have the privileges to do so, otherwise it just dumps 0 >as we would when kptr_restrict is enabled

Re: [PATCH net] bpf: don't let ldimm64 leak map addresses on unprivileged

2017-05-08 Thread Alexei Starovoitov
On Mon, May 08, 2017 at 12:04:09AM +0200, Daniel Borkmann wrote: > The patch fixes two things at once: > > 1) It checks the env->allow_ptr_leaks and only prints the map address to >the log if we have the privileges to do so, otherwise it just dumps 0 >as we would when kptr_restrict is enab

Re: [PATCH net] bpf: don't let ldimm64 leak map addresses on unprivileged

2017-05-08 Thread Daniel Borkmann
On 05/08/2017 12:04 AM, Daniel Borkmann wrote: The patch fixes two things at once: 1) It checks the env->allow_ptr_leaks and only prints the map address to the log if we have the privileges to do so, otherwise it just dumps 0 as we would when kptr_restrict is enabled on %pK. Given the la

Re: [PATCH net] bpf: don't let ldimm64 leak map addresses on unprivileged

2017-05-07 Thread Jann Horn
On Mon, May 8, 2017 at 12:51 AM, Daniel Borkmann wrote: > On 05/08/2017 12:26 AM, Jann Horn wrote: >> >> On Mon, May 8, 2017 at 12:04 AM, Daniel Borkmann >> wrote: >>> >>> The patch fixes two things at once: >>> >>> 1) It checks the env->allow_ptr_leaks and only prints the map address to >>>

Re: [PATCH net] bpf: don't let ldimm64 leak map addresses on unprivileged

2017-05-07 Thread Daniel Borkmann
On 05/08/2017 12:26 AM, Jann Horn wrote: On Mon, May 8, 2017 at 12:04 AM, Daniel Borkmann wrote: The patch fixes two things at once: 1) It checks the env->allow_ptr_leaks and only prints the map address to the log if we have the privileges to do so, otherwise it just dumps 0 as we woul

[PATCH net] bpf: don't let ldimm64 leak map addresses on unprivileged

2017-05-07 Thread Daniel Borkmann
The patch fixes two things at once: 1) It checks the env->allow_ptr_leaks and only prints the map address to the log if we have the privileges to do so, otherwise it just dumps 0 as we would when kptr_restrict is enabled on %pK. Given the latter is off by default and not every distro sets

Re: [PATCH net] bpf: don't let ldimm64 leak map addresses on unprivileged

2017-05-07 Thread Jann Horn
On Mon, May 8, 2017 at 12:04 AM, Daniel Borkmann wrote: > The patch fixes two things at once: > > 1) It checks the env->allow_ptr_leaks and only prints the map address to >the log if we have the privileges to do so, otherwise it just dumps 0 >as we would when kptr_restrict is enabled on %p