Re: [PATCH v9 6/7] powerpc/code-patching: Use temporary mm for Radix MMU

2022-11-07 Thread Benjamin Gray
On Thu, 2022-11-03 at 14:10 +1100, Benjamin Gray wrote: > On Wed, 2022-11-02 at 10:11 +, Christophe Leroy wrote: > > Le 25/10/2022 à 06:44, Benjamin Gray a écrit : > > > +   /* > > > +    * PTE allocation uses GFP_KERNEL which means we need to > > > +    * pre-allocate the PTE here

Re: [PATCH v9 6/7] powerpc/code-patching: Use temporary mm for Radix MMU

2022-11-02 Thread Benjamin Gray
On Wed, 2022-11-02 at 10:11 +, Christophe Leroy wrote: > Le 25/10/2022 à 06:44, Benjamin Gray a écrit : > > +static int text_area_cpu_up_mm(unsigned int cpu) > > +{ > > +   struct mm_struct *mm; > > +   unsigned long addr; > > +   pgd_t *pgdp; > > +   p4d_t *p4dp; > > +   pu

Re: [PATCH v9 6/7] powerpc/code-patching: Use temporary mm for Radix MMU

2022-11-02 Thread Christophe Leroy
Le 25/10/2022 à 06:44, Benjamin Gray a écrit : > From: "Christopher M. Riedl" > > x86 supports the notion of a temporary mm which restricts access to > temporary PTEs to a single CPU. A temporary mm is useful for situations > where a CPU needs to perform sensitive operations (such as patching a

[PATCH v9 6/7] powerpc/code-patching: Use temporary mm for Radix MMU

2022-10-24 Thread Benjamin Gray
From: "Christopher M. Riedl" x86 supports the notion of a temporary mm which restricts access to temporary PTEs to a single CPU. A temporary mm is useful for situations where a CPU needs to perform sensitive operations (such as patching a STRICT_KERNEL_RWX kernel) requiring temporary mappings wit