Re: [PATCH bpf-next] bpf: Remove bpf_lsm_file_mprotect from sleepable list.

2020-08-31 Thread Daniel Borkmann
On 8/31/20 10:16 PM, Alexei Starovoitov wrote: From: Alexei Starovoitov Technically the bpf programs can sleep while attached to bpf_lsm_file_mprotect, but such programs need to access user memory. So they're in might_fault() category. Which means they cannot be called from file_mprotect lsm ho

[PATCH bpf-next] bpf: Remove bpf_lsm_file_mprotect from sleepable list.

2020-08-31 Thread Alexei Starovoitov
From: Alexei Starovoitov Technically the bpf programs can sleep while attached to bpf_lsm_file_mprotect, but such programs need to access user memory. So they're in might_fault() category. Which means they cannot be called from file_mprotect lsm hook that takes write lock on mm->mmap_lock. Adjust