Re: [PATCH bpf] bpf: respect CAP_IPC_LOCK in RLIMIT_MEMLOCK check

2019-09-16 Thread Alexei Starovoitov
On Mon, Sep 16, 2019 at 07:09:06AM -0700, Christian Barcenas wrote: > > bpf() is currently the only exception to the above, ie. as far as I can tell > it is the only code that enforces RLIMIT_MEMLOCK but does not honor > CAP_IPC_LOCK. Yes. bpf is not honoring CAP_IPC_LOCK comparing to other place

Re: [PATCH bpf] bpf: respect CAP_IPC_LOCK in RLIMIT_MEMLOCK check

2019-09-16 Thread Christian Barcenas
On 9/11/19 8:18 PM, Christian Barcenas wrote: A process can lock memory addresses into physical RAM explicitly (via mlock, mlockall, shmctl, etc.) or implicitly (via VFIO, perf ring-buffers, bpf maps, etc.), subject to RLIMIT_MEMLOCK limits. CAP_IPC_LOCK allows a process to exceed these limits,

Re: [PATCH bpf] bpf: respect CAP_IPC_LOCK in RLIMIT_MEMLOCK check

2019-09-16 Thread Daniel Borkmann
On 9/11/19 8:18 PM, Christian Barcenas wrote: A process can lock memory addresses into physical RAM explicitly (via mlock, mlockall, shmctl, etc.) or implicitly (via VFIO, perf ring-buffers, bpf maps, etc.), subject to RLIMIT_MEMLOCK limits. CAP_IPC_LOCK allows a process to exceed these limits,

Re: [PATCH bpf] bpf: respect CAP_IPC_LOCK in RLIMIT_MEMLOCK check

2019-09-13 Thread Yonghong Song
On 9/11/19 7:18 PM, Christian Barcenas wrote: > A process can lock memory addresses into physical RAM explicitly > (via mlock, mlockall, shmctl, etc.) or implicitly (via VFIO, > perf ring-buffers, bpf maps, etc.), subject to RLIMIT_MEMLOCK limits. > > CAP_IPC_LOCK allows a process to exceed thes

[PATCH bpf] bpf: respect CAP_IPC_LOCK in RLIMIT_MEMLOCK check

2019-09-11 Thread Christian Barcenas
A process can lock memory addresses into physical RAM explicitly (via mlock, mlockall, shmctl, etc.) or implicitly (via VFIO, perf ring-buffers, bpf maps, etc.), subject to RLIMIT_MEMLOCK limits. CAP_IPC_LOCK allows a process to exceed these limits, and throughout the kernel this capability is che