[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251006215505.GB3234160@ax162>
Date: Mon, 6 Oct 2025 14:55:05 -0700
From: Nathan Chancellor <nathan@...nel.org>
To: Sasha Levin <sashal@...nel.org>
Cc: patches@...ts.linux.dev, stable@...r.kernel.org,
"Borislav Petkov (AMD)" <bp@...en8.de>, tglx@...utronix.de,
mingo@...hat.com, dave.hansen@...ux.intel.com, x86@...nel.org,
linux-kernel@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: [PATCH AUTOSEL 6.17-5.4] x86/build: Remove cc-option from stack
alignment flags
On Mon, Oct 06, 2025 at 02:17:33PM -0400, Sasha Levin wrote:
> From: Nathan Chancellor <nathan@...nel.org>
>
> [ Upstream commit d87208128a3330c0eab18301ab39bdb419647730 ]
>
> '-mpreferred-stack-boundary' (the GCC option) and '-mstack-alignment'
> (the clang option) have been supported in their respective compilers for
> some time, so it is unnecessary to check for support for them via
> cc-option. '-mpreferred-stack-boundary=3' had a restriction on
> '-mno-sse' until GCC 7.1 but that is irrelevant for most of the kernel,
> which includes '-mno-sse'.
>
> Move to simple Kconfig checks to avoid querying the compiler for the
> flags that it supports.
>
> Signed-off-by: Nathan Chancellor <nathan@...nel.org>
> Signed-off-by: Borislav Petkov (AMD) <bp@...en8.de>
> Link: https://lore.kernel.org/20250814-x86-min-ver-cleanups-v1-2-ff7f19457523@kernel.org
> Signed-off-by: Sasha Levin <sashal@...nel.org>
...
> ## Backport Status: NO
...
> **Dependency Analysis:**
> - Requires minimum GCC 8.1 for x86 (introduced in v6.15 via commit
> a3e8fe814ad1)
> - Requires minimum Clang 15.0.0 for x86 (commit 7861640aac52b)
> - Both requirements are satisfied in 6.17 stable tree (verified via
> scripts/min-tool-version.sh)
> - GCC 7.1+ supports `-mpreferred-stack-boundary=3` with `-msse` (per GCC
> commit 34fac449e121)
...
> ### Conclusion
>
> While this commit is technically safe and provides a marginal build-time
> performance improvement by eliminating unnecessary runtime compiler
> checks, **it does not meet the fundamental requirement for stable kernel
> backporting**: it does not fix a bug that affects users.
>
> The commit is purely a cleanup that removes obsolete code after compiler
> minimum version requirements were raised. Such cleanups belong in
> mainline development, not stable trees, which should focus exclusively
> on fixing bugs that impact users.
>
> The fact that it was auto-selected by AUTOSEL does not override the
> documented stable kernel rules. This commit should be **rejected** from
> stable backporting or **reverted** if already applied.
Based on all of this, I would agree that it is not really suitable for
backporting (at least not beyond 6.15, whereas the subject says back to
5.4), so why was this still sent for review?
Cheers,
Nathan
Powered by blists - more mailing lists