Le 14/10/2026 à 13:23, Julian Braha a écrit :
On 10/12/26 11:28, Christophe Leroy (CS GROUP) wrote:
Le 11/10/2026 à 13:31, Julian Braha a écrit :
On PPC_85xx, enabling DEBUG_PAGEALLOC without STRICT_KERNEL_RWX activates
the DATA_SHIFT range of 20..24, but since the PAGE_SHIFT default is
outside the range (12), kconfig adjusts it to 20, causing 1mb alignment
instead of 4kb. However, the larger alignment is only needed for the
separate kernel permissions provided by STRICT_KERNEL_RWX.

Since PPC_85xx uses page poisoning for DEBUG_PAGEALLOC and does not
support KFENCE, let's restrict this range to STRICT_KERNEL_RWX.

This out-of-range default was detected by kconfirm, a static analysis
tool
for Kconfig.

Looks like with this change I'm now able to set DATA_SHIFT to any value
when STRICT_KERNEL_RWX is not set and DEBUG_PAGEALLOC is set.

The range used to protect against that.

Sorry, yeah kconfig can be tricky...

+    range 20 24 if STRICT_KERNEL_RWX && PPC_85xx
I think if we keep this ^ and then add another range:

     range PAGE_SHIFT 24 if !STRICT_KERNEL_RWX && PPC_85xx

this would cover your STRICT_KERNEL_RWX=n and DEBUG_PAGEALLOC=y
configuration while resolving the 12 -> 20

Yes I think that should work.

Christophe

Reply via email to