Re: [PATCH 0/2] Noinstr fixes for K[CA]SAN with GCOV

Marco Elver <[email protected]> Wed, 28 Jan 2026 00:21:07 +0100
Newsgroups org.kernel.vger.linux-toolchains,org.kernel.vger.linux-kernel
Message-ID <CANpmjNN5q0r6FEph2P1E2DvBTgFrWFgWkV_kyxiUQwbouLj4+g@mail.gmail.com>
On Thu, 18 Dec 2025 at 13:54, Segher Boessenkool
<[email protected]> wrote:
>
> Hi!
>
> On Thu, Dec 18, 2025 at 01:18:13PM +0100, Peter Zijlstra wrote:
> > On Thu, Dec 18, 2025 at 05:58:44AM -0600, Segher Boessenkool wrote:
> >
> > > You might have more success getting the stuff backported to some
> > > distro(s) you care about?  Or get people to use newer compilers more
> > > quickly of course, "five years" before people have it is pretty
> > > ridiculous, two years is at the tail end of things already.
> >
> > There is a difference between having and requiring it :/ Our current
> > minimum compiler version is gcc-8 or clang-15 (IIRC).
>
> Very much so.  If you have good reasons for requiring it, make sure you
> voice that with your backport request!
>
> Nothing we (again, GCC) do is *only* motivated by procedures.  We can do
> unusual things in unusual situations.  But you need extraordinary
> evidence for why extraordinary things would be needed, of course.  Does
> that apply here, you think?
>
> > On the bright side, I think we can be more aggressively with compiler
> > versions for debug builds vs regular builds. Not being able to build a
> > KASAN/UBSAN/whateverSAN kernel isn't too big of a problem (IMO).
>
> Absolutely.  Just document the feature as needing a recent compiler!

For future reference:
https://discourse.llvm.org/t/explicit-sanitizer-checks-with-builtin-allow-sanitize-check/89383
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123442

Clang 22 should have the builtin.