From: Kees Cook <kees@kernel.org>
To: Nathan Chancellor <nathan@kernel.org>,
Justin Stitt <justinstitt@google.com>
Cc: Kees Cook <kees@kernel.org>,
linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH] kunit/stackinit: Cover declarations bypassed by goto and switch
Date: Mon, 5 Oct 2026 02:41:35 -0700 [thread overview]
Message-ID: <179119329489.226996.14504267736248191429.b4-ty@kernel.org> (raw)
In-Reply-To: <20261002-kspp-125-v1-1-91286a454fda@google.com>
On Fri, 02 Oct 2026 12:12:53 -0700, Justin Stitt wrote:
> Under -ftrivial-auto-var-init= the initialization is emitted where a
> variable is declared. A switch dispatch that reaches a case label below
> the declaration, or a goto that jumps past it, never reaches that point,
> so the variable was left uninitialized.
>
> Commit 9cf016e6b49b ("lib: test_stackinit.c: XFAIL switch variable init
> tests") marked test_switch_1_none and test_switch_2_none as expected
> failures, noting the test should be retained "so that we can evaluate
> compiler fixes". Clang 24 emits the initialization on the jumps that
> bypass the declaration, so make the expectation depend on the compiler
> version instead of failing unconditionally.
>
> [...]
Applied to for-next/hardening, thanks!
[1/1] kunit/stackinit: Cover declarations bypassed by goto and switch
https://git.kernel.org/kees/c/6bf37b9c59dc
Take care,
--
Kees Cook
prev parent reply other threads:[~2026-10-05 9:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-02 19:12 Justin Stitt
2026-10-05 9:41 ` Kees Cook [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=179119329489.226996.14504267736248191429.b4-ty@kernel.org \
--to=kees@kernel.org \
--cc=justinstitt@google.com \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=nathan@kernel.org \
/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®