Re: [PATCH v3 14/25] arm64: implement PKEYS support

2023-12-14 Thread Joey Gouly
On Mon, Dec 11, 2023 at 06:49:37PM +, Catalin Marinas wrote: > On Fri, Nov 24, 2023 at 04:34:59PM +, Joey Gouly wrote: > > @@ -211,11 +212,24 @@ init_new_context(struct task_struct *tsk, struct > > mm_struct *mm) > > { > > atomic64_set(&mm->context.id, 0); > > refcount_set(&mm->co

Re: [PATCH v3 14/25] arm64: implement PKEYS support

2023-12-11 Thread Catalin Marinas
On Fri, Nov 24, 2023 at 04:34:59PM +, Joey Gouly wrote: > @@ -211,11 +212,24 @@ init_new_context(struct task_struct *tsk, struct > mm_struct *mm) > { > atomic64_set(&mm->context.id, 0); > refcount_set(&mm->context.pinned, 0); > + > + // pkey 0 is the default, so always reserve

[PATCH v3 14/25] arm64: implement PKEYS support

2023-11-24 Thread Joey Gouly
Implement the PKEYS interface, using the Permission Overlay Extension. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/include/asm/mmu.h | 2 + arch/arm64/include/asm/mmu_context.h | 32 - arch/arm64/include/asm/pgtable.h | 23 +- a