On 27/08/20 9:39 am, Aneesh Kumar K.V wrote: > This patch updates kernel hash page table entries to use storage key 3 > for its mapping. This implies all kernel access will now use key 3 to > control READ/WRITE. The patch also prevents the allocation of key 3 from > userspace and UAMOR value is updated such that userspace cannot modify key 3. > > Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.ibm.com> > --- > .../powerpc/include/asm/book3s/64/hash-pkey.h | 24 ++++++++++++++----- > arch/powerpc/include/asm/book3s/64/hash.h | 2 +- > arch/powerpc/include/asm/book3s/64/mmu-hash.h | 1 + > arch/powerpc/include/asm/mmu_context.h | 2 +- > arch/powerpc/mm/book3s64/hash_4k.c | 2 +- > arch/powerpc/mm/book3s64/hash_64k.c | 4 ++-- > arch/powerpc/mm/book3s64/hash_hugepage.c | 2 +- > arch/powerpc/mm/book3s64/hash_hugetlbpage.c | 2 +- > arch/powerpc/mm/book3s64/hash_pgtable.c | 2 +- > arch/powerpc/mm/book3s64/hash_utils.c | 10 ++++---- > arch/powerpc/mm/book3s64/pkeys.c | 4 ++++ > 11 files changed, 37 insertions(+), 18 deletions(-) > Reviewed-by: Sandipan Das <sandi...@linux.ibm.com>
- [PATCH v5 00/23] Kernel userspace access/execution preven... Aneesh Kumar K.V
- [PATCH v5 01/23] powerpc: Add new macro to handle NE... Aneesh Kumar K.V
- [PATCH v5 02/23] KVM: PPC: BOOK3S: PR: Ignore UAMOR ... Aneesh Kumar K.V
- [PATCH v5 03/23] powerpc/book3s64/kuap/kuep: Make KU... Aneesh Kumar K.V
- [PATCH v5 04/23] powerpc/book3s64/kuap/kuep: Move ua... Aneesh Kumar K.V
- [PATCH v5 05/23] powerpc/book3s64/kuap: Move KUAP re... Aneesh Kumar K.V
- [PATCH v5 06/23] powerpc/book3s64/kup: Use the corre... Aneesh Kumar K.V
- [PATCH v5 07/23] powerpc/book3s64/kuep: Move KUEP re... Aneesh Kumar K.V
- [PATCH v5 09/23] powerpc/book3s64/kuap: Use Key 3 fo... Aneesh Kumar K.V
- Re: [PATCH v5 09/23] powerpc/book3s64/kuap: Use ... Sandipan Das
- [PATCH v5 08/23] powerpc/book3s64/kuap: Rename MMU_F... Aneesh Kumar K.V
- Re: [PATCH v5 08/23] powerpc/book3s64/kuap: Rena... Christophe Leroy
- [PATCH v5 10/23] powerpc/exec: Set thread.regs early... Aneesh Kumar K.V
- [PATCH v5 11/23] powerpc/book3s64/pkeys: Store/resto... Aneesh Kumar K.V
- Re: [PATCH v5 11/23] powerpc/book3s64/pkeys: Sto... Sandipan Das
- [PATCH v5 12/23] powerpc/book3s64/pkeys: Inherit cor... Aneesh Kumar K.V
- Re: [PATCH v5 12/23] powerpc/book3s64/pkeys: Inh... Sandipan Das
- [PATCH v5 13/23] powerpc/book3s64/pkeys: Reset users... Aneesh Kumar K.V
- Re: [PATCH v5 13/23] powerpc/book3s64/pkeys: Res... Sandipan Das
- [PATCH v5 14/23] powerpc/ptrace-view: Use pt_regs va... Aneesh Kumar K.V