Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

powerpc/book3s64/hash/kuep: Enable KUEP on hash

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Reviewed-by: Sandipan Das <sandipan@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20201127044424.40686-21-aneesh.kumar@linux.ibm.com

authored by

Aneesh Kumar K.V and committed by
Michael Ellerman
c91435d9 b2ff33a1

+6 -1
+6 -1
arch/powerpc/mm/book3s64/pkeys.c
··· 244 244 #ifdef CONFIG_PPC_KUEP 245 245 void __init setup_kuep(bool disabled) 246 246 { 247 - if (disabled || !early_radix_enabled()) 247 + if (disabled) 248 + return; 249 + /* 250 + * On hash if PKEY feature is not enabled, disable KUAP too. 251 + */ 252 + if (!early_radix_enabled() && !early_mmu_has_feature(MMU_FTR_PKEY)) 248 253 return; 249 254 250 255 if (smp_processor_id() == boot_cpuid) {