Re: [PATCH v10 05/10] powerpc/bpf: Write protect JIT code

2021-04-20 Thread Michael Ellerman
Jordan Niethe writes: > On Wed, Mar 31, 2021 at 9:37 PM Michael Ellerman wrote: >> >> Jordan Niethe writes: >> >> > Once CONFIG_STRICT_MODULE_RWX is enabled there will be no need to >> > override bpf_jit_free() because it is now possible to set images >> > read-only. So use the default implement

Re: [PATCH v10 05/10] powerpc/bpf: Write protect JIT code

2021-04-20 Thread Jordan Niethe
On Wed, Mar 31, 2021 at 9:37 PM Michael Ellerman wrote: > > Jordan Niethe writes: > > > Once CONFIG_STRICT_MODULE_RWX is enabled there will be no need to > > override bpf_jit_free() because it is now possible to set images > > read-only. So use the default implementation. > > > > Also add the nec

Re: [PATCH v10 05/10] powerpc/bpf: Write protect JIT code

2021-03-31 Thread Christophe Leroy
Le 31/03/2021 à 12:37, Michael Ellerman a écrit : Jordan Niethe writes: Once CONFIG_STRICT_MODULE_RWX is enabled there will be no need to override bpf_jit_free() because it is now possible to set images read-only. So use the default implementation. Also add the necessary call to bpf_jit_bi

Re: [PATCH v10 05/10] powerpc/bpf: Write protect JIT code

2021-03-31 Thread Michael Ellerman
Jordan Niethe writes: > Once CONFIG_STRICT_MODULE_RWX is enabled there will be no need to > override bpf_jit_free() because it is now possible to set images > read-only. So use the default implementation. > > Also add the necessary call to bpf_jit_binary_lock_ro() which will > remove write protec

[PATCH v10 05/10] powerpc/bpf: Write protect JIT code

2021-03-29 Thread Jordan Niethe
Once CONFIG_STRICT_MODULE_RWX is enabled there will be no need to override bpf_jit_free() because it is now possible to set images read-only. So use the default implementation. Also add the necessary call to bpf_jit_binary_lock_ro() which will remove write protection and add exec protection to the