Re: New warning `cryptd: no symbol version for this_cpu_off`

From: Uros Bizjak
Date: Thu Apr 03 2025 - 17:20:05 EST


On Thu, Apr 3, 2025 at 3:42 PM Uros Bizjak <ubizjak@xxxxxxxxx> wrote:
>
> On Thu, Apr 3, 2025 at 3:20 PM Paul Menzel <pmenzel@xxxxxxxxxxxxx> wrote:
> >
> > Dear Uros,
> >
> >
> > Am 03.04.25 um 15:14 schrieb Uros Bizjak:
> > > On Thu, Apr 3, 2025 at 2:30 PM Paul Menzel <pmenzel@xxxxxxxxxxxxx> wrote:
> > >>
> > >> #regzbot ^introduced: 6a367577153a
> > >>
> > >> [To: +Uros, Cc: +Nadav, +Andrew]
> >
> > >> Am 03.04.25 um 09:35 schrieb Paul Menzel:
> > >>
> > >>> On the Intel Kaby Lake laptop Dell XPS 13 9360, updating from
> > >>> 6.14.0-11270-g08733088b566 to 6.14.0-12456-gacc4d5ff0b61, Linux logs the
> > >>> new warning below:
> > >>>
> > >>> cryptd: no symbol version for this_cpu_off
> > >>>
> > >>> I haven’t bisected it, but could it be commit 06aa03056f90 (x86/smp:
> > >>> Move this_cpu_off to percpu hot section). It says to have no functional
> > >>> change though.
> > >>
> > >> `git bisect` led to commit 6a367577153a (percpu/x86: enable strict
> > >> percpu checks via named AS qualifiers).
> > >>
> > >> $ git bisect start
> > >> $ git bisect good 08733088b566
> > >> $ git bisect bad acc4d5ff0b61
> > >
> > > Can you please post your .config?
> >
> > Sorry, I didn’t attach it right away. It’s attached now.
>
> Huh, it looks that modpost chokes on __seg_gs prefixed symbols.

It is not modpost, but genksyms that doesn't know how to handle
__typeof_unqual__().

Can you please test the attached patch, it should fix the problem for you.

Thanks,
Uros.
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 27725f1ab5ab..98057f93938c 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