lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFULd4bWM3X9_8iHmbiRst=nxBmLD7FU=xyJ1D2xKq0hi57+0Q@mail.gmail.com>
Date: Sat, 12 Apr 2025 10:20:01 +0200
From: Uros Bizjak <ubizjak@...il.com>
To: Borislav Petkov <bp@...en8.de>
Cc: linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>, 
	linux-tip-commits@...r.kernel.org, Paul Menzel <pmenzel@...gen.mpg.de>, x86@...nel.org
Subject: Re: [tip: core/urgent] compiler.h: Avoid the usage of
 __typeof_unqual__() when __GENKSYMS__ is defined

On Fri, Apr 11, 2025 at 11:07 PM Borislav Petkov <bp@...en8.de> wrote:
>
> On Thu, Apr 10, 2025 at 10:58:46AM -0000, tip-bot2 for Uros Bizjak wrote:
> > The following commit has been merged into the core/urgent branch of tip:
> >
> > Commit-ID:     e696e5a114b59035f5a889d5484fedec4f40c1f3
> > Gitweb:        https://git.kernel.org/tip/e696e5a114b59035f5a889d5484fedec4f40c1f3
> > Author:        Uros Bizjak <ubizjak@...il.com>
> > AuthorDate:    Fri, 04 Apr 2025 12:24:37 +02:00
> > Committer:     Borislav Petkov (AMD) <bp@...en8.de>
> > CommitterDate: Thu, 10 Apr 2025 12:44:27 +02:00
> >
> > compiler.h: Avoid the usage of __typeof_unqual__() when __GENKSYMS__ is defined
> >
> > Current version of genksyms doesn't know anything about __typeof_unqual__()
> > operator.  Avoid the usage of __typeof_unqual__() with genksyms to prevent
> > errors when symbols are versioned.
> >
> > There were no problems with gendwarfksyms.
> >
> > Fixes: ac053946f5c40 ("compiler.h: introduce TYPEOF_UNQUAL() macro")
> > Closes: https://lore.kernel.org/lkml/81a25a60-de78-43fb-b56a-131151e1c035@molgen.mpg.de/
> > Reported-by: Paul Menzel <pmenzel@...gen.mpg.de>
> > Signed-off-by: Uros Bizjak <ubizjak@...il.com>
> > Signed-off-by: Borislav Petkov (AMD) <bp@...en8.de>
> > Tested-by: Paul Menzel <pmenzel@...gen.mpg.de>
> > Link: https://lore.kernel.org/r/20250404102535.705090-1-ubizjak@gmail.com
> > ---
> >  include/linux/compiler.h | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/include/linux/compiler.h b/include/linux/compiler.h
> > index 27725f1..98057f9 100644
> > --- a/include/linux/compiler.h
> > +++ b/include/linux/compiler.h
> > @@ -229,10 +229,10 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val,
> >  /*
> >   * Use __typeof_unqual__() when available.
> >   *
> > - * XXX: Remove test for __CHECKER__ once
> > - * sparse learns about __typeof_unqual__().
> > + * XXX: Remove test for __GENKSYMS__ once "genksyms" handles
> > + * __typeof_unqual__(), and test for __CHECKER__ once "sparse" handles it.
> >   */
> > -#if CC_HAS_TYPEOF_UNQUAL && !defined(__CHECKER__)
> > +#if CC_HAS_TYPEOF_UNQUAL && !defined(__GENKSYMS__) && !defined(__CHECKER__)
> >  # define USE_TYPEOF_UNQUAL 1
> >  #endif
>
> So mingo is right - this is not really a fix but a brown-paper bag of
> sorts.
>
> The right thing to do here is to unpatch the __typeof_unqual__ stuff
> until all the fallout from it - genksyms and whatever else - has been
> fixed properly.
>
> So to avoid too much churn I's suggest something like this (totally untested
> ofc) until all has been fixed.

FYI, the sparse patch is at [1], but the talk about the abandoned
project suggests that __typeof_unqual__ and dependent percpu checks
will remain disabled for some time.

[1] https://lore.kernel.org/linux-sparse/5b8d0dee-8fb6-45af-ba6c-7f74aff9a4b8@stanley.mountain/

Uros.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ