diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2025-01-13 18:00:50 +0300 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2025-01-18 03:11:46 +0300 |
commit | a8b7d066f8626ec847d3e66aef1320968d1fe298 (patch) | |
tree | 085d4d87aea414c4e7acda9171419aa5bd10e94f /scripts/gdb/linux/utils.py | |
parent | 2966b66c94a2b0d897f8626b8f2c50a0fd4878a9 (diff) | |
download | linux-a8b7d066f8626ec847d3e66aef1320968d1fe298.tar.xz |
genksyms: fix syntax error for attribute before nested_declarator
A longstanding issue with genksyms is that it has hidden syntax errors.
When a syntax error occurs, yyerror() is called. However,
error_with_pos() is a no-op unless the -w option is provided.
You can observe syntax errors by manually passing the -w option.
For example, with CONFIG_MODVERSIONS=y on v6.13-rc1:
$ make -s KCFLAGS=-D__GENKSYMS__ drivers/acpi/prmt.i
$ cat drivers/acpi/prmt.i | scripts/genksyms/genksyms -w
[ snip ]
drivers/acpi/prmt.c:56: syntax error
The syntax error occurs in the following code in drivers/acpi/prmt.c:
struct prm_handler_info {
[ snip ]
efi_status_t (__efiapi *handler_addr)(u64, void *);
[ snip ]
};
The issue arises from __efiapi, which is defined as either
__attribute__((ms_abi)) or __attribute__((regparm(0))).
This commit allows nested_declarator to be prefixed with attributes.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Nicolas Schier <n.schier@avm.de>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions