Re: [RFC PATCH 2/3] powerpc/lib: Initialize a temporary mm for code patching

2020-04-24 Thread Steven Rostedt
On Fri, 17 Apr 2020 10:57:10 +1000 Michael Ellerman wrote: > >>> Does it needs to be a BUG_ON() ? Can't we fail gracefully with just a > >>> WARN_ON ? > >>> > >> > >> I'm not sure what failing gracefully means here? The main reason this could > >> fail is if there is not enough memory to alloc

Re: [RFC PATCH 2/3] powerpc/lib: Initialize a temporary mm for code patching

2020-04-16 Thread Michael Ellerman
Christophe Leroy writes: > Le 31/03/2020 à 05:19, Christopher M Riedl a écrit : >>> On March 24, 2020 11:10 AM Christophe Leroy wrote: >>> Le 23/03/2020 à 05:52, Christopher M. Riedl a écrit : When code patching a STRICT_KERNEL_RWX kernel the page containing the address to be patched is

Re: [RFC PATCH 2/3] powerpc/lib: Initialize a temporary mm for code patching

2020-04-14 Thread Christopher M Riedl
> On April 8, 2020 6:01 AM Christophe Leroy wrote: > > > Le 31/03/2020 à 05:19, Christopher M Riedl a écrit : > >> On March 24, 2020 11:10 AM Christophe Leroy > >> wrote: > >> > >> > >> Le 23/03/2020 à 05:52, Christopher M. Riedl a écrit : > >>> When code patching a STRICT_KERNEL_RWX kerne

Re: [RFC PATCH 2/3] powerpc/lib: Initialize a temporary mm for code patching

2020-04-08 Thread Christophe Leroy
Le 31/03/2020 à 05:19, Christopher M Riedl a écrit : On March 24, 2020 11:10 AM Christophe Leroy wrote: Le 23/03/2020 à 05:52, Christopher M. Riedl a écrit : When code patching a STRICT_KERNEL_RWX kernel the page containing the address to be patched is temporarily mapped with permissive

Re: [RFC PATCH 2/3] powerpc/lib: Initialize a temporary mm for code patching

2020-03-30 Thread Christopher M Riedl
> On March 24, 2020 11:10 AM Christophe Leroy wrote: > > > Le 23/03/2020 à 05:52, Christopher M. Riedl a écrit : > > When code patching a STRICT_KERNEL_RWX kernel the page containing the > > address to be patched is temporarily mapped with permissive memory > > protections. Currently, a per-cpu

Re: [RFC PATCH 2/3] powerpc/lib: Initialize a temporary mm for code patching

2020-03-24 Thread Christophe Leroy
Le 23/03/2020 à 05:52, Christopher M. Riedl a écrit : When code patching a STRICT_KERNEL_RWX kernel the page containing the address to be patched is temporarily mapped with permissive memory protections. Currently, a per-cpu vmalloc patch area is used for this purpose. While the patch area is

[RFC PATCH 2/3] powerpc/lib: Initialize a temporary mm for code patching

2020-03-22 Thread Christopher M. Riedl
When code patching a STRICT_KERNEL_RWX kernel the page containing the address to be patched is temporarily mapped with permissive memory protections. Currently, a per-cpu vmalloc patch area is used for this purpose. While the patch area is per-cpu, the temporary page mapping is inserted into the ke