From: Julian Braha <julianbraha@gmail.com>
To: maddy@linux.ibm.com
Cc: mpe@ellerman.id.au, npiggin@gmail.com, chleroy@kernel.org,
ritesh.list@gmail.com, sshegde@linux.ibm.com,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [RESEND PATCH] powerpc/Kconfig: limit the PPC_85xx DATA_SHIFT range to STRICT_KERNEL_RWX
Date: Wed, 2 Dec 2026 00:43:14 +0000 [thread overview]
Message-ID: <51046021-fd56-48d4-bc51-25cbcd7a8a0c@gmail.com> (raw)
In-Reply-To: <20261201224535.1812143-1-julianbraha@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1762 bytes --]
On 12/1/26 22:45, Julian Braha wrote:
> 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 found by kconfirm, a static analysis tool
> for Kconfig.
>
> Signed-off-by: Julian Braha <julianbraha@gmail.com>
> ---
> arch/powerpc/Kconfig | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
> index c3b6cd655606..09e6027389b2 100644
> --- a/arch/powerpc/Kconfig
> +++ b/arch/powerpc/Kconfig
> @@ -896,7 +896,8 @@ config DATA_SHIFT
> default 24 if STRICT_KERNEL_RWX && PPC64
> range 17 28 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_BOOK3S_32
> range 14 23 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_8xx
> - range 20 24 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_85xx
> + range 20 24 if STRICT_KERNEL_RWX && PPC_85xx
> + range PAGE_SHIFT 24 if !STRICT_KERNEL_RWX && PPC_85xx
> default 22 if STRICT_KERNEL_RWX && PPC_BOOK3S_32
> default 18 if (DEBUG_PAGEALLOC || KFENCE) && PPC_BOOK3S_32
> default 23 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_8xx && \
> -- 2.56.0
>
Sorry all, I accidentally resent v1, instead of v2:
https://lore.kernel.org/all/20261014125553.2280686-1-julianbraha@gmail.com/
- Julian Braha
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
prev parent reply other threads:[~2026-12-02 0:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 22:45 Julian Braha
2026-12-02 0:43 ` Julian Braha [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51046021-fd56-48d4-bc51-25cbcd7a8a0c@gmail.com \
--to=julianbraha@gmail.com \
--cc=chleroy@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=ritesh.list@gmail.com \
--cc=sshegde@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®