Re: [RESEND PATCH v4 08/11] powerpc: Initialize and use a temporary mm for patching

2021-07-08 Thread Christopher M. Riedl
On Thu Jul 1, 2021 at 2:51 AM CDT, Nicholas Piggin wrote: > Excerpts from Christopher M. Riedl's message of July 1, 2021 5:02 pm: > > On Thu Jul 1, 2021 at 1:12 AM CDT, Nicholas Piggin wrote: > >> Excerpts from Christopher M. Riedl's message of May 6, 2021 2:34 pm: > >> > When code patching a

Re: [RESEND PATCH v4 08/11] powerpc: Initialize and use a temporary mm for patching

2021-07-01 Thread Nicholas Piggin
Excerpts from Christopher M. Riedl's message of July 1, 2021 5:02 pm: > On Thu Jul 1, 2021 at 1:12 AM CDT, Nicholas Piggin wrote: >> Excerpts from Christopher M. Riedl's message of May 6, 2021 2:34 pm: >> > When code patching a STRICT_KERNEL_RWX kernel the page containing the >> > address to be

Re: [RESEND PATCH v4 08/11] powerpc: Initialize and use a temporary mm for patching

2021-07-01 Thread Christopher M. Riedl
On Thu Jul 1, 2021 at 1:12 AM CDT, Nicholas Piggin wrote: > Excerpts from Christopher M. Riedl's message of May 6, 2021 2:34 pm: > > When code patching a STRICT_KERNEL_RWX kernel the page containing the > > address to be patched is temporarily mapped as writeable. Currently, a > > per-cpu vmalloc

Re: [RESEND PATCH v4 08/11] powerpc: Initialize and use a temporary mm for patching

2021-07-01 Thread Nicholas Piggin
Excerpts from Christopher M. Riedl's message of May 6, 2021 2:34 pm: > When code patching a STRICT_KERNEL_RWX kernel the page containing the > address to be patched is temporarily mapped as writeable. Currently, a > per-cpu vmalloc patch area is used for this purpose. While the patch > area is

Re: [RESEND PATCH v4 08/11] powerpc: Initialize and use a temporary mm for patching

2021-06-30 Thread Christopher M. Riedl
On Sun Jun 20, 2021 at 10:19 PM CDT, Daniel Axtens wrote: > Hi Chris, > > > + /* > > +* Choose a randomized, page-aligned address from the range: > > +* [PAGE_SIZE, DEFAULT_MAP_WINDOW - PAGE_SIZE] > > +* The lower address bound is PAGE_SIZE to avoid the zero-page. > > +* The

Re: [RESEND PATCH v4 08/11] powerpc: Initialize and use a temporary mm for patching

2021-06-20 Thread Daniel Axtens
Hi Chris, > + /* > + * Choose a randomized, page-aligned address from the range: > + * [PAGE_SIZE, DEFAULT_MAP_WINDOW - PAGE_SIZE] > + * The lower address bound is PAGE_SIZE to avoid the zero-page. > + * The upper address bound is DEFAULT_MAP_WINDOW - PAGE_SIZE to stay > +

[RESEND PATCH v4 08/11] powerpc: Initialize and use a temporary mm for patching

2021-05-05 Thread Christopher M. Riedl
When code patching a STRICT_KERNEL_RWX kernel the page containing the address to be patched is temporarily mapped as writeable. 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 kernel page tables for

[PATCH v4 08/11] powerpc: Initialize and use a temporary mm for patching

2021-04-29 Thread Christopher M. Riedl
When code patching a STRICT_KERNEL_RWX kernel the page containing the address to be patched is temporarily mapped as writeable. 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 kernel page tables for