powerpc/book3s64/hash/kuap: Enable kuap 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-20-aneesh.kumar@linux.ibm.com
This commit is contained in:
parent
292f86c4c6
commit
b2ff33a10c
1 changed files with 6 additions and 1 deletions
|
@ -265,7 +265,12 @@ void __init setup_kuep(bool disabled)
|
||||||
#ifdef CONFIG_PPC_KUAP
|
#ifdef CONFIG_PPC_KUAP
|
||||||
void __init setup_kuap(bool disabled)
|
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;
|
return;
|
||||||
|
|
||||||
if (smp_processor_id() == boot_cpuid) {
|
if (smp_processor_id() == boot_cpuid) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue