Re: [PATCH] x86/alternative: don't call text_poke() in lazy TLB mode

2020-10-22 Thread Jürgen Groß
On 22.10.20 12:45, Peter Zijlstra wrote: On Thu, Oct 22, 2020 at 11:24:39AM +0200, Jürgen Groß wrote: On 09.10.20 16:42, Juergen Gross wrote: When running in lazy TLB mode the currently active page tables might be the ones of a previous process, e.g. when running a kernel thread. This can be p

Re: [PATCH] x86/alternative: don't call text_poke() in lazy TLB mode

2020-10-22 Thread Peter Zijlstra
On Thu, Oct 22, 2020 at 11:24:39AM +0200, Jürgen Groß wrote: > On 09.10.20 16:42, Juergen Gross wrote: > > When running in lazy TLB mode the currently active page tables might > > be the ones of a previous process, e.g. when running a kernel thread. > > > > This can be problematic in case kernel c

Re: [PATCH] x86/alternative: don't call text_poke() in lazy TLB mode

2020-10-22 Thread Jürgen Groß
On 09.10.20 16:42, Juergen Gross wrote: When running in lazy TLB mode the currently active page tables might be the ones of a previous process, e.g. when running a kernel thread. This can be problematic in case kernel code is being modified via text_poke() in a kernel thread, and on another proc

Re: [PATCH] x86/alternative: don't call text_poke() in lazy TLB mode

2020-10-12 Thread Peter Zijlstra
On Mon, Oct 12, 2020 at 12:26:06PM +0200, Jürgen Groß wrote: > > > @@ -807,6 +807,15 @@ static inline temp_mm_state_t > > > use_temporary_mm(struct mm_struct *mm) > > > temp_mm_state_t temp_state; > > > lockdep_assert_irqs_disabled(); > > > + > > > + /* > > > + * Make sure no

Re: [PATCH] x86/alternative: don't call text_poke() in lazy TLB mode

2020-10-12 Thread Jürgen Groß
On 12.10.20 12:13, Peter Zijlstra wrote: On Fri, Oct 09, 2020 at 04:42:25PM +0200, Juergen Gross wrote: When running in lazy TLB mode the currently active page tables might be the ones of a previous process, e.g. when running a kernel thread. This can be problematic in case kernel code is being

Re: [PATCH] x86/alternative: don't call text_poke() in lazy TLB mode

2020-10-12 Thread Peter Zijlstra
On Fri, Oct 09, 2020 at 04:42:25PM +0200, Juergen Gross wrote: > When running in lazy TLB mode the currently active page tables might > be the ones of a previous process, e.g. when running a kernel thread. > > This can be problematic in case kernel code is being modified via > text_poke() in a ker

[PATCH] x86/alternative: don't call text_poke() in lazy TLB mode

2020-10-09 Thread Juergen Gross
When running in lazy TLB mode the currently active page tables might be the ones of a previous process, e.g. when running a kernel thread. This can be problematic in case kernel code is being modified via text_poke() in a kernel thread, and on another processor exit_mmap() is active for the proces