From: Kees Cook <kees@kernel.org>
To: Nicolas Schier <nicolas.schier@linux.dev>
Cc: Masahiro Yamada <masahiroy@kernel.org>,
Nathan Chancellor <nathan@kernel.org>,
Petr Pavlu <petr.pavlu@suse.com>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Justin Stitt <justinstitt@google.com>,
Marco Elver <elver@google.com>,
Andrey Konovalov <andreyknvl@gmail.com>,
Andrey Ryabinin <ryabinin.a.a@gmail.com>,
Nick Desaulniers <nick.desaulniers+lkml@gmail.com>,
Bill Wendling <morbo@google.com>,
linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org,
linux-kbuild@vger.kernel.org, kasan-dev@googlegroups.com,
llvm@lists.linux.dev
Subject: Re: [PATCH v3 0/3] Detect changed compiler dependencies for full rebuild
Date: Thu, 8 May 2025 08:56:07 -0700 [thread overview]
Message-ID: <202505080855.DF4FB68A@keescook> (raw)
In-Reply-To: <20250507-mature-idealistic-toad-59c15f@l-nschier-aarch64>
On Wed, May 07, 2025 at 02:02:42PM +0200, Nicolas Schier wrote:
> On Sat, 03 May 2025, Kees Cook wrote:
>
> > v3: move to include/generated, add touch helper
> > v2: https://lore.kernel.org/lkml/20250502224512.it.706-kees@kernel.org/
> > v1: https://lore.kernel.org/lkml/20250501193839.work.525-kees@kernel.org/
> >
> > Hi,
> >
> > This is my attempt to introduce dependencies that track the various
> > compiler behaviors that may globally change the build that aren't
> > represented by either compiler flags nor the compiler version
> > (CC_VERSION_TEXT). Namely, this is to detect when the contents of a
> > file the compiler uses changes. We have 3 such situations currently in
> > the tree:
> >
> > - If any of the GCC plugins change, we need to rebuild everything that
> > was built with them, as they may have changed their behavior and those
> > behaviors may need to be synchronized across all translation units.
> > (The most obvious of these is the randstruct GCC plugin, but is true
> > for most of them.)
> >
> > - If the randstruct seed itself changes (whether for GCC plugins or
> > Clang), the entire tree needs to be rebuilt since the randomization of
> > structures may change between compilation units if not.
> >
> > - If the integer-wrap-ignore.scl file for Clang's integer wrapping
> > sanitizer changes, a full rebuild is needed as the coverage for wrapping
> > types may have changed, once again cause behavior differences between
> > compilation units.
>
> I am unsure if it is too much detail, but I'd like to see some of these
> infos in include/linux/compiler-version.h, too.
Yeah, that's a good idea. No reason to make people dig for the commit
logs, etc -- it should be immediately discoverable. I've updated the
patches to include the (slight rephrased) text above.
Thanks!
--
Kees Cook
prev parent reply other threads:[~2025-05-08 15:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-03 18:46 [PATCH v3 0/3] Detect changed compiler dependencies for full rebuild Kees Cook
2025-05-03 18:46 ` [PATCH v3 1/3] gcc-plugins: Force full rebuild when plugins change Kees Cook
2025-05-07 12:01 ` Nicolas Schier
2025-05-07 12:10 ` Nicolas Schier
2025-05-03 18:46 ` [PATCH v3 2/3] randstruct: Force full rebuild when seed changes Kees Cook
2025-05-07 12:14 ` Nicolas Schier
2025-05-03 18:46 ` [PATCH v3 3/3] integer-wrap: Force full rebuild when .scl file changes Kees Cook
2025-05-05 18:16 ` Justin Stitt
2025-05-05 18:18 ` Justin Stitt
2025-05-07 12:21 ` Nicolas Schier
2025-05-07 12:02 ` [PATCH v3 0/3] Detect changed compiler dependencies for full rebuild Nicolas Schier
2025-05-08 15:56 ` 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=202505080855.DF4FB68A@keescook \
--to=kees@kernel.org \
--cc=andreyknvl@gmail.com \
--cc=bigeasy@linutronix.de \
--cc=elver@google.com \
--cc=justinstitt@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=masahiroy@kernel.org \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=nick.desaulniers+lkml@gmail.com \
--cc=nicolas.schier@linux.dev \
--cc=petr.pavlu@suse.com \
--cc=ryabinin.a.a@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.