Skip to content

Commit

Permalink
powerpc/book3s64/hash/kuap: Enable kuap on hash
Browse files Browse the repository at this point in the history
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-20-aneesh.kumar@linux.ibm.com
  • Loading branch information
Aneesh Kumar K.V authored and Michael Ellerman committed Dec 3, 2020
1 parent 292f86c commit b2ff33a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion arch/powerpc/mm/book3s64/pkeys.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,12 @@ void __init setup_kuep(bool disabled)
#ifdef CONFIG_PPC_KUAP
void __init setup_kuap(bool disabled)
{
if (disabled || !early_radix_enabled())
if (disabled)
return;
/*
* On hash if PKEY feature is not enabled, disable KUAP too.
*/
if (!early_radix_enabled() && !early_mmu_has_feature(MMU_FTR_PKEY))
return;

if (smp_processor_id() == boot_cpuid) {
Expand Down

0 comments on commit b2ff33a

Please sign in to comment.