* [PATCH] genksyms: Handle typeof_unqual keyword and __seg_{fs,gs} qualifiers
@ 2025-04-13 22:07 Uros Bizjak
2025-04-14 7:20 ` Ingo Molnar
2025-04-14 7:32 ` [tip: core/urgent] " tip-bot2 for Uros Bizjak
0 siblings, 2 replies; 5+ messages in thread
From: Uros Bizjak @ 2025-04-13 22:07 UTC (permalink / raw)
To: linux-kernel
Cc: Uros Bizjak, Paul Menzel, Masahiro Yamada, Andrew Morton,
Ingo Molnar, Borislav Petkov
Handle typeof_unqual, __typeof_unqual and __typeof_unqual__ keywords
using TYPEOF_KEYW token in the same way as typeof keyword.
Also ignore x86 __seg_fs and __seg_gs named address space qualifiers
using X86_SEG_KEYW token in the same way as const, volatile or
restrict qualifiers.
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Reported-by: Paul Menzel <pmenzel@molgen.mpg.de>
Closes: https://lore.kernel.org/lkml/81a25a60-de78-43fb-b56a-131151e1c035@molgen.mpg.de/
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
---
scripts/genksyms/keywords.c | 7 +++++++
scripts/genksyms/parse.y | 5 ++++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/scripts/genksyms/keywords.c b/scripts/genksyms/keywords.c
index b85e0979a00c..ee1499d27061 100644
--- a/scripts/genksyms/keywords.c
+++ b/scripts/genksyms/keywords.c
@@ -17,6 +17,8 @@ static struct resword {
{ "__signed__", SIGNED_KEYW },
{ "__typeof", TYPEOF_KEYW },
{ "__typeof__", TYPEOF_KEYW },
+ { "__typeof_unqual", TYPEOF_KEYW },
+ { "__typeof_unqual__", TYPEOF_KEYW },
{ "__volatile", VOLATILE_KEYW },
{ "__volatile__", VOLATILE_KEYW },
{ "__builtin_va_list", VA_LIST_KEYW },
@@ -40,6 +42,10 @@ static struct resword {
// KAO. },
// { "attribute", ATTRIBUTE_KEYW },
+ // X86 named address space qualifiers
+ { "__seg_gs", X86_SEG_KEYW },
+ { "__seg_fs", X86_SEG_KEYW },
+
{ "auto", AUTO_KEYW },
{ "char", CHAR_KEYW },
{ "const", CONST_KEYW },
@@ -57,6 +63,7 @@ static struct resword {
{ "struct", STRUCT_KEYW },
{ "typedef", TYPEDEF_KEYW },
{ "typeof", TYPEOF_KEYW },
+ { "typeof_unqual", TYPEOF_KEYW },
{ "union", UNION_KEYW },
{ "unsigned", UNSIGNED_KEYW },
{ "void", VOID_KEYW },
diff --git a/scripts/genksyms/parse.y b/scripts/genksyms/parse.y
index ee600a804fa1..efdcf07c4eb6 100644
--- a/scripts/genksyms/parse.y
+++ b/scripts/genksyms/parse.y
@@ -91,6 +91,8 @@ static void record_compound(struct string_list **keyw,
%token TYPEOF_KEYW
%token VA_LIST_KEYW
+%token X86_SEG_KEYW
+
%token EXPORT_SYMBOL_KEYW
%token ASM_PHRASE
@@ -292,7 +294,8 @@ type_qualifier_seq:
;
type_qualifier:
- CONST_KEYW | VOLATILE_KEYW
+ X86_SEG_KEYW
+ | CONST_KEYW | VOLATILE_KEYW
| RESTRICT_KEYW
{ /* restrict has no effect in prototypes so ignore it */
remove_node($1);
--
2.42.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] genksyms: Handle typeof_unqual keyword and __seg_{fs,gs} qualifiers
2025-04-13 22:07 [PATCH] genksyms: Handle typeof_unqual keyword and __seg_{fs,gs} qualifiers Uros Bizjak
@ 2025-04-14 7:20 ` Ingo Molnar
2025-04-14 7:52 ` Uros Bizjak
2025-04-14 7:32 ` [tip: core/urgent] " tip-bot2 for Uros Bizjak
1 sibling, 1 reply; 5+ messages in thread
From: Ingo Molnar @ 2025-04-14 7:20 UTC (permalink / raw)
To: Uros Bizjak
Cc: linux-kernel, Paul Menzel, Masahiro Yamada, Andrew Morton,
Borislav Petkov
* Uros Bizjak <ubizjak@gmail.com> wrote:
> Handle typeof_unqual, __typeof_unqual and __typeof_unqual__ keywords
> using TYPEOF_KEYW token in the same way as typeof keyword.
>
> Also ignore x86 __seg_fs and __seg_gs named address space qualifiers
> using X86_SEG_KEYW token in the same way as const, volatile or
> restrict qualifiers.
>
> Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
> Reported-by: Paul Menzel <pmenzel@molgen.mpg.de>
> Closes: https://lore.kernel.org/lkml/81a25a60-de78-43fb-b56a-131151e1c035@molgen.mpg.de/
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Borislav Petkov <bp@alien8.de>
> ---
> scripts/genksyms/keywords.c | 7 +++++++
> scripts/genksyms/parse.y | 5 ++++-
> 2 files changed, 11 insertions(+), 1 deletion(-)
Thanks, applied to tip:core/urgent.
I've also added this tag for context:
Fixes: ac053946f5c4 ("compiler.h: introduce TYPEOF_UNQUAL() macro")
Ingo
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] genksyms: Handle typeof_unqual keyword and __seg_{fs,gs} qualifiers
2025-04-14 7:20 ` Ingo Molnar
@ 2025-04-14 7:52 ` Uros Bizjak
2025-04-14 7:57 ` Ingo Molnar
0 siblings, 1 reply; 5+ messages in thread
From: Uros Bizjak @ 2025-04-14 7:52 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Paul Menzel, Masahiro Yamada, Andrew Morton,
Borislav Petkov
On Mon, Apr 14, 2025 at 9:20 AM Ingo Molnar <mingo@kernel.org> wrote:
>
>
> * Uros Bizjak <ubizjak@gmail.com> wrote:
>
> > Handle typeof_unqual, __typeof_unqual and __typeof_unqual__ keywords
> > using TYPEOF_KEYW token in the same way as typeof keyword.
> >
> > Also ignore x86 __seg_fs and __seg_gs named address space qualifiers
> > using X86_SEG_KEYW token in the same way as const, volatile or
> > restrict qualifiers.
> >
> > Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
> > Reported-by: Paul Menzel <pmenzel@molgen.mpg.de>
> > Closes: https://lore.kernel.org/lkml/81a25a60-de78-43fb-b56a-131151e1c035@molgen.mpg.de/
> > Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> > Cc: Andrew Morton <akpm@linux-foundation.org>
> > Cc: Ingo Molnar <mingo@kernel.org>
> > Cc: Borislav Petkov <bp@alien8.de>
> > ---
> > scripts/genksyms/keywords.c | 7 +++++++
> > scripts/genksyms/parse.y | 5 ++++-
> > 2 files changed, 11 insertions(+), 1 deletion(-)
>
> Thanks, applied to tip:core/urgent.
>
> I've also added this tag for context:
>
> Fixes: ac053946f5c4 ("compiler.h: introduce TYPEOF_UNQUAL() macro")
Heh, I intentionally removed it because the patch now fixes genksyms.
No big deal, though.
Thanks,
Uros.
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] genksyms: Handle typeof_unqual keyword and __seg_{fs,gs} qualifiers
2025-04-14 7:52 ` Uros Bizjak
@ 2025-04-14 7:57 ` Ingo Molnar
0 siblings, 0 replies; 5+ messages in thread
From: Ingo Molnar @ 2025-04-14 7:57 UTC (permalink / raw)
To: Uros Bizjak
Cc: linux-kernel, Paul Menzel, Masahiro Yamada, Andrew Morton,
Borislav Petkov
* Uros Bizjak <ubizjak@gmail.com> wrote:
> On Mon, Apr 14, 2025 at 9:20 AM Ingo Molnar <mingo@kernel.org> wrote:
> >
> >
> > * Uros Bizjak <ubizjak@gmail.com> wrote:
> >
> > > Handle typeof_unqual, __typeof_unqual and __typeof_unqual__ keywords
> > > using TYPEOF_KEYW token in the same way as typeof keyword.
> > >
> > > Also ignore x86 __seg_fs and __seg_gs named address space qualifiers
> > > using X86_SEG_KEYW token in the same way as const, volatile or
> > > restrict qualifiers.
> > >
> > > Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
> > > Reported-by: Paul Menzel <pmenzel@molgen.mpg.de>
> > > Closes: https://lore.kernel.org/lkml/81a25a60-de78-43fb-b56a-131151e1c035@molgen.mpg.de/
> > > Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> > > Cc: Andrew Morton <akpm@linux-foundation.org>
> > > Cc: Ingo Molnar <mingo@kernel.org>
> > > Cc: Borislav Petkov <bp@alien8.de>
> > > ---
> > > scripts/genksyms/keywords.c | 7 +++++++
> > > scripts/genksyms/parse.y | 5 ++++-
> > > 2 files changed, 11 insertions(+), 1 deletion(-)
> >
> > Thanks, applied to tip:core/urgent.
> >
> > I've also added this tag for context:
> >
> > Fixes: ac053946f5c4 ("compiler.h: introduce TYPEOF_UNQUAL() macro")
>
> Heh, I intentionally removed it because the patch now fixes genksyms.
There's meritocratical value in generously accepting blame, even if you
are only 10% to blame. ;-)
Ingo
^ permalink raw reply [flat|nested] 5+ messages in thread
* [tip: core/urgent] genksyms: Handle typeof_unqual keyword and __seg_{fs,gs} qualifiers
2025-04-13 22:07 [PATCH] genksyms: Handle typeof_unqual keyword and __seg_{fs,gs} qualifiers Uros Bizjak
2025-04-14 7:20 ` Ingo Molnar
@ 2025-04-14 7:32 ` tip-bot2 for Uros Bizjak
1 sibling, 0 replies; 5+ messages in thread
From: tip-bot2 for Uros Bizjak @ 2025-04-14 7:32 UTC (permalink / raw)
To: linux-tip-commits
Cc: Paul Menzel, Uros Bizjak, Ingo Molnar, Andrew Morton,
Linus Torvalds, Masahiro Yamada, x86, linux-kernel
The following commit has been merged into the core/urgent branch of tip:
Commit-ID: 1013f5636fd808569c1f4c40a58a4efc70713a28
Gitweb: https://git.kernel.org/tip/1013f5636fd808569c1f4c40a58a4efc70713a28
Author: Uros Bizjak <ubizjak@gmail.com>
AuthorDate: Mon, 14 Apr 2025 00:07:34 +02:00
Committer: Ingo Molnar <mingo@kernel.org>
CommitterDate: Mon, 14 Apr 2025 09:19:04 +02:00
genksyms: Handle typeof_unqual keyword and __seg_{fs,gs} qualifiers
Handle typeof_unqual, __typeof_unqual and __typeof_unqual__ keywords
using TYPEOF_KEYW token in the same way as typeof keyword.
Also ignore x86 __seg_fs and __seg_gs named address space qualifiers
using X86_SEG_KEYW token in the same way as const, volatile or
restrict qualifiers.
Fixes: ac053946f5c4 ("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@molgen.mpg.de>
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Link: https://lore.kernel.org/r/20250413220749.270704-1-ubizjak@gmail.com
---
scripts/genksyms/keywords.c | 7 +++++++
scripts/genksyms/parse.y | 5 ++++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/scripts/genksyms/keywords.c b/scripts/genksyms/keywords.c
index b85e097..ee1499d 100644
--- a/scripts/genksyms/keywords.c
+++ b/scripts/genksyms/keywords.c
@@ -17,6 +17,8 @@ static struct resword {
{ "__signed__", SIGNED_KEYW },
{ "__typeof", TYPEOF_KEYW },
{ "__typeof__", TYPEOF_KEYW },
+ { "__typeof_unqual", TYPEOF_KEYW },
+ { "__typeof_unqual__", TYPEOF_KEYW },
{ "__volatile", VOLATILE_KEYW },
{ "__volatile__", VOLATILE_KEYW },
{ "__builtin_va_list", VA_LIST_KEYW },
@@ -40,6 +42,10 @@ static struct resword {
// KAO. },
// { "attribute", ATTRIBUTE_KEYW },
+ // X86 named address space qualifiers
+ { "__seg_gs", X86_SEG_KEYW },
+ { "__seg_fs", X86_SEG_KEYW },
+
{ "auto", AUTO_KEYW },
{ "char", CHAR_KEYW },
{ "const", CONST_KEYW },
@@ -57,6 +63,7 @@ static struct resword {
{ "struct", STRUCT_KEYW },
{ "typedef", TYPEDEF_KEYW },
{ "typeof", TYPEOF_KEYW },
+ { "typeof_unqual", TYPEOF_KEYW },
{ "union", UNION_KEYW },
{ "unsigned", UNSIGNED_KEYW },
{ "void", VOID_KEYW },
diff --git a/scripts/genksyms/parse.y b/scripts/genksyms/parse.y
index ee600a8..efdcf07 100644
--- a/scripts/genksyms/parse.y
+++ b/scripts/genksyms/parse.y
@@ -91,6 +91,8 @@ static void record_compound(struct string_list **keyw,
%token TYPEOF_KEYW
%token VA_LIST_KEYW
+%token X86_SEG_KEYW
+
%token EXPORT_SYMBOL_KEYW
%token ASM_PHRASE
@@ -292,7 +294,8 @@ type_qualifier_seq:
;
type_qualifier:
- CONST_KEYW | VOLATILE_KEYW
+ X86_SEG_KEYW
+ | CONST_KEYW | VOLATILE_KEYW
| RESTRICT_KEYW
{ /* restrict has no effect in prototypes so ignore it */
remove_node($1);
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-04-14 7:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-13 22:07 [PATCH] genksyms: Handle typeof_unqual keyword and __seg_{fs,gs} qualifiers Uros Bizjak
2025-04-14 7:20 ` Ingo Molnar
2025-04-14 7:52 ` Uros Bizjak
2025-04-14 7:57 ` Ingo Molnar
2025-04-14 7:32 ` [tip: core/urgent] " tip-bot2 for Uros Bizjak
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.