Re: [PATCH] compiler.h: Avoid the usage of __typeof_unqual__() when __GENKSYMS__ is defined
From: Masahiro Yamada
Date: Fri Apr 04 2025 - 15:14:22 EST
On Fri, Apr 4, 2025 at 11:37 PM Uros Bizjak <ubizjak@xxxxxxxxx> wrote:
>
> On Fri, Apr 4, 2025 at 4:06 PM Masahiro Yamada <masahiroy@xxxxxxxxxx> wrote:
>
> > > > > 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.
> > > > >
> > > > > Signed-off-by: Uros Bizjak <ubizjak@xxxxxxxxx>
> > > > > Fixes: ac053946f5c40 ("compiler.h: introduce TYPEOF_UNQUAL() macro")
> > > > > Reported-by: Paul Menzel <pmenzel@xxxxxxxxxxxxx>
> > > > > Closes: https://lore.kernel.org/lkml/81a25a60-de78-43fb-b56a-131151e1c035@xxxxxxxxxxxxx/
> > > > > Cc: Sami Tolvanen <samitolvanen@xxxxxxxxxx>
> > > > > Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> > > > > ---
> > > >
> > > >
> > > > Why don't you add it to the genksyms keyword table?
> > >
> > > It doesn't work, even if I patch it with an even more elaborate patch
> > > (attached).
> > >
> > > I guess some more surgery will be needed, but for now a fallback works
> > > as expected.
> > >
> > > Uros.
> >
> > The attached patch looks good to me.
>
> FAOD - do you refer to the submitted one for compiler.h or to the one
> for scripts/genksyms/keywords.c? (The latter doesn't fix the warning,
> though).
You are still seeing the warnings because __typeof_unqual__
is not only the issue.
Hint:
$ make -s KCFLAGS=-D__GENKSYMS__ arch/x86/kernel/setup_percpu.i
$ grep 'this_cpu_off;' arch/x86/kernel/setup_percpu.i
--
Best Regards
Masahiro Yamada