From: Kees Cook <kees@kernel.org>
To: Nicolas Schier <n.schier@avm.de>
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <benno.lossin@proton.me>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>,
"Masahiro Yamada" <masahiroy@kernel.org>,
"Nicolas Schier" <nicolas.schier@linux.dev>,
linux-hardening@vger.kernel.org, linux-kbuild@vger.kernel.org,
linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org
Subject: Re: [PATCH] randstruct: Rebuild completely if randstruct.seed changes
Date: Tue, 29 Apr 2025 09:52:54 -0700 [thread overview]
Message-ID: <202504290951.8C3D7C7653@keescook> (raw)
In-Reply-To: <20250429-rebuild-on-randstruct-seed-changes-v1-1-16a74fe65538@avm.de>
On Tue, Apr 29, 2025 at 02:59:13PM +0200, Nicolas Schier wrote:
> Include generated/randstruct_hash.h in linux/compiler-version.h to force
> a complete rebuild if CONFIG_RANDSTRUCT is enabled and randstruct.seed
> changes.
>
> Removal or change of scripts/basic/randstruct.seed leads to a remake of
> generated/randstruct_hash.h. As linux/compiler-version.h is a
> hard-coded include for every kbuild induced compilation, conditionally
> adding generated/randstruct_hash.h there adds it as build-dependency to
> each object file.
This does technically work, but this feels like the wrong solution.
Also, this won't work for another case where I need a similar thing: if
the .scl file for the integer sanitizer changes, we need to do the same
full rebuild, and that's not a C file.
I think we need to explicitly inject something into fixdep...
--
Kees Cook
prev parent reply other threads:[~2025-04-29 16:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-29 12:59 [PATCH] randstruct: Rebuild completely if randstruct.seed changes Nicolas Schier
2025-04-29 13:11 ` Miguel Ojeda
2025-04-29 16:52 ` 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=202504290951.8C3D7C7653@keescook \
--to=kees@kernel.org \
--cc=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=benno.lossin@proton.me \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=dakr@kernel.org \
--cc=gary@garyguo.net \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=n.schier@avm.de \
--cc=nicolas.schier@linux.dev \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
/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