[PATCH v2 1/2] powerpc/ps3: Change updateboltedpp panic to info

Geoff Levand geoff at infradead.org
Sun Jan 15 08:22:33 AEDT 2023


Hi Christophe,

On 1/9/23 09:41, Christophe Leroy wrote:
> 
> 
> Le 03/01/2023 à 18:51, Geoff Levand a écrit :
>> Commit fdacae8a84024474afff234bdd1dbe19ad597a10 (powerpc: Activate
>> CONFIG_STRICT_KERNEL_RWX by default) causes ps3_hpte_updateboltedpp()
>> to be called.  Change the panic statment in ps3_hpte_updateboltedpp()
>> to a pr_info statement so that bootup can continue.
> 
> But if I understand correctly, it means that CONFIG_STRICT_KERNEL_RWX 
> won't work then.
> 
> So, shouldn't we keep the panic and forbid CONFIG_STRICT_KERNEL_RWX on PS3 ?

mmu_hash_ops.updateboltedpp returns void, so I can't return an error code to
indicate the feature is not supported.

I could do something like this in arch/powerpc/Kconfig:

-       select ARCH_HAS_STRICT_KERNEL_RWX       if (PPC_BOOK3S || PPC_8xx || 40x) && !HIBERNATION
+       select ARCH_HAS_STRICT_KERNEL_RWX       if (PPC_BOOK3S || PPC_8xx || 40x) && !PPC_PS3 && !HIBERNATION

But then the ppc64_defconfig would be built without STRICT_KERNEL_RWX.

I could do this in ps3_defconfig:

+# CONFIG_STRICT_KERNEL_RWX is not set
+# CONFIG_STRICT_MODULE_RWX is not set

But I don't like that way because it seems too easy for users to not add those
into a custom kernel config, and then they need to figure out what to do after
their kernel panics on startup.

What other 'clean' way is there?

-Geoff




More information about the Linuxppc-dev mailing list