Re: [PATCH v5 23/26] powerpc/book3s64/kuap: Move UAMOR setup to key init function

2020-07-07 Thread Aneesh Kumar K.V
Michael Ellerman writes: > "Aneesh Kumar K.V" writes: > . >> @@ -232,8 +246,9 @@ void __init setup_kuap(bool disabled) >> cur_cpu_spec->mmu_features |= MMU_FTR_KUAP; >> } >> >> -/* Make sure userspace can't change the AMR */ >> -mtspr(SPRN_UAMOR, 0); > > Why

Re: [PATCH v5 23/26] powerpc/book3s64/kuap: Move UAMOR setup to key init function

2020-07-07 Thread Michael Ellerman
"Aneesh Kumar K.V" writes: > UAMOR values are not application-specific. It used to be, that's worth mentioning. > The kernel initializes its value based on different reserved keys. > Remove the thread-specific UAMOR value and don't switch the UAMOR on > context switch. > > Move UAMOR

[PATCH v5 23/26] powerpc/book3s64/kuap: Move UAMOR setup to key init function

2020-06-19 Thread Aneesh Kumar K.V
UAMOR values are not application-specific. The kernel initializes its value based on different reserved keys. Remove the thread-specific UAMOR value and don't switch the UAMOR on context switch. Move UAMOR initialization to key initialization code. Now that KUAP/KUEP feature depends on