arm64/sve: fix genksyms generation
PATCH 1/1 arm64/sve: fix genksyms generation
genksyms does not understand __uint128_t, so we get a build failure in the fpsimd module when it cannot export a symbol right:
WARNING: EXPORT symbol "kernel_neon_begin" [vmlinux] version generation failed, symbol will not be versioned. /home/arnd/cross/x86_64/gcc-8.1.0-nolibc/aarch64-linux/bin/aarch64-linux-ld: arch/arm64/kernel/fpsimd.o: relocation R_AARCH64_ABS32 against `__crc_kernel_neon_begin' can not be used when making a shared object arch/arm64/kernel/fpsimd.o:(.data+0x0): dangerous relocation: unsupported relocation
arch/arm64/kernel/fpsimd.o:(".discard.addressable"+0x0): dangerous relocation: unsupported relocation
arch/arm64/kernel/fpsimd.o:(".discard.addressable"+0x8): dangerous relocation: unsupported relocation
We could teach genksyms about the type, but it's easier to just work around it by defining that type locally in a way that genksyms understands.
--- arch/arm64/kernel/fpsimd.c | 3 +++ 1 file changed, 3 insertions(+)
arch/arm64/kernel/fpsimd.c +3 -0
@@ -400,6 +400,9 @@ static int __init sve_sysctl_init(void) { return 0; }#define ZREG (sve_state, vq, n) ((char *)(sve_state) + \ (SVE_SIG_ZREG_OFFSET(vq, n) - SVE_SIG_REGS_OFFSET)) +#ifdef __GENKSYMS__ +typedef __u64 __uint128_t [2 ]; +#endif #ifdef CONFIG_CPU_BIG_ENDIAN static __uint128_t arm64_cpu_to_le128 (__uint128_t x) {
Signature · 1 line
2.20.0
Hi Arnd,
Quoted 2 lines · Arnd Bergmann
genksyms does not understand
__uint128_t, so we get a build failure in the fpsimd module when it cannot export a symbol right:
The fpsimd code is builtin, so which module is actually failing? My allmodconfig build succeeds, so I must be missing something.
Quoted 11 lines
WARNING: EXPORT symbol "
kernel_neon_begin" [vmlinux] version generation failed, symbol will not be versioned./home/arnd/cross/x86_64/gcc-8.1.0-nolibc/aarch64-linux/bin/aarch64-linux-ld:arch/arm64/kernel/fpsimd.o: relocationR_AARCH64_ABS32against `__crc_kernel_neon_begin' can not be used when making a shared object arch/arm64/kernel/fpsimd.o:(.data+0x0): dangerous relocation: unsupported relocation
arch/arm64/kernel/fpsimd.o:(".discard.addressable"+0x0): dangerous relocation: unsupported relocation
arch/arm64/kernel/fpsimd.o:(".discard.addressable"+0x8): dangerous relocation: unsupported relocationWe could teach genksyms about the type, but it's easier to just work around it by defining that type locally in a way that genksyms understands.
Fixes 41040cf7c5f0 ("arm64/sve: Fix missing SVE/FPSIMD endianness conversions")
I can't see which part of that patch causes the problem, so I'm a bit wary of the fix. We've been using __uint128_t for a while now, and I see there's one in the x86 kvm code as well, so it would be nice to understand what's happening here so that we can avoid running into it in future as well.
Quoted 10 lines
Signed-off-by Arnd Bergmann <[email protected]>--- arch/arm64/kernel/fpsimd.c | 3 +++ 1 file changed, 3 insertions(+)arch/arm64/kernel/fpsimd.c +0
-0
arch/arm64/kernel/fpsimd.c static int __init sve_sysctl_init(void) { return 0; } · line 405
Quoted 6 lines
arch/arm64/kernel/fpsimd.c +3
-0@@ -400,6 +400,9 @@ static int __init sve_sysctl_init(void) { return 0; }#define ZREG (sve_state, vq, n) ((char *)(sve_state) + \ (SVE_SIG_ZREG_OFFSET(vq, n) - SVE_SIG_REGS_OFFSET)) +#ifdef __GENKSYMS__ +typedef __u64 __uint128_t [2 ]; +#endif
I suspect I need to figure out what genksyms is doing, but I'm nervous about exposing this as an array type without understanding whether or not that has consequences for its operation.
Will
Quoted 9 lines · Will Deacon
Hi Arnd,
Quoted 2 lines · Arnd Bergmann
genksyms does not understand
__uint128_t, so we get a build failure in the fpsimd module when it cannot export a symbol right:The fpsimd code is builtin, so which module is actually failing? My allmodconfig build succeeds, so I must be missing something.
It happened for me on randconfig builds, you can find one such configuration at https://pastebin.com/cU8iQ4ta now. I was building this with clang rather than gcc, which may affect the issue, but I assumed not.
Quoted 10 lines
Quoted 10 lines
WARNING: EXPORT symbol "
kernel_neon_begin" [vmlinux] version generation failed, symbol will not be versioned./home/arnd/cross/x86_64/gcc-8.1.0-nolibc/aarch64-linux/bin/aarch64-linux-ld:arch/arm64/kernel/fpsimd.o: relocationR_AARCH64_ABS32against `__crc_kernel_neon_begin' can not be used when making a shared object arch/arm64/kernel/fpsimd.o:(.data+0x0): dangerous relocation: unsupported relocation
arch/arm64/kernel/fpsimd.o:(".discard.addressable"+0x0): dangerous relocation: unsupported relocation
arch/arm64/kernel/fpsimd.o:(".discard.addressable"+0x8): dangerous relocation: unsupported relocationWe could teach genksyms about the type, but it's easier to just work around it by defining that type locally in a way that genksyms understands.
Quoted 6 lines
Quoted 1 line
Fixes 41040cf7c5f0 ("arm64/sve: Fix missing SVE/FPSIMD endianness conversions")I can't see which part of that patch causes the problem, so I'm a bit wary of the fix. We've been using
__uint128_tfor a while now, and I see there's one in the x86 kvm code as well, so it would be nice to understand what's happening here so that we can avoid running into it in future as well.
The problem is only in files that export a symbol. This is also the case in arch/x86/kernel/kvm.c, but it may be lucky because the type only appears /after/ the last export in that file.
Quoted 13 lines
Quoted 13 lines
Signed-off-by Arnd Bergmann <[email protected]>--- arch/arm64/kernel/fpsimd.c | 3 +++ 1 file changed, 3 insertions(+)arch/arm64/kernel/fpsimd.c +0
-0@@ -400,6 +400,9 @@ static int __init sve_sysctl_init(void) { return 0; }#define ZREG (sve_state, vq, n) ((char *)(sve_state) + \ (SVE_SIG_ZREG_OFFSET(vq, n) - SVE_SIG_REGS_OFFSET))
Quoted 7 lines
arch/arm64/kernel/fpsimd.c static int __init sve_sysctl_init(void) { return 0; } · line 405
Quoted 3 lines
arch/arm64/kernel/fpsimd.c +3
-0+#ifdef __GENKSYMS__ +typedef __u64 __uint128_t [2 ]; +#endif I suspect I need to figure out what genksyms is doing, but I'm nervous about exposing this as an array type without understanding whether or not that has consequences for its operation.
The entire point is genksyms is to ensure that types of exported symbols are compatible. To do this, it has a limited parser for C source code that understands the basic types (char, int, long, _Bool, etc) and how to aggregate them into structs and function arguments. This process has always been fragile, and it clearly breaks when it fails to understand a particular type.
Arnd
Quoted 57 lines · Arnd Bergmann
Quoted 9 lines · Will Deacon
Hi Arnd,
Quoted 2 lines · Arnd Bergmann
genksyms does not understand
__uint128_t, so we get a build failure in the fpsimd module when it cannot export a symbol right:The fpsimd code is builtin, so which module is actually failing? My allmodconfig build succeeds, so I must be missing something.
It happened for me on randconfig builds, you can find one such configuration at https://pastebin.com/cU8iQ4ta now. I was building this with clang rather than gcc, which may affect the issue, but I assumed not.
Quoted 10 lines
Quoted 10 lines
WARNING: EXPORT symbol "
kernel_neon_begin" [vmlinux] version generation failed, symbol will not be versioned./home/arnd/cross/x86_64/gcc-8.1.0-nolibc/aarch64-linux/bin/aarch64-linux-ld:arch/arm64/kernel/fpsimd.o: relocationR_AARCH64_ABS32against `__crc_kernel_neon_begin' can not be used when making a shared object arch/arm64/kernel/fpsimd.o:(.data+0x0): dangerous relocation: unsupported relocation
arch/arm64/kernel/fpsimd.o:(".discard.addressable"+0x0): dangerous relocation: unsupported relocation
arch/arm64/kernel/fpsimd.o:(".discard.addressable"+0x8): dangerous relocation: unsupported relocationWe could teach genksyms about the type, but it's easier to just work around it by defining that type locally in a way that genksyms understands.
Quoted 6 lines
Quoted 1 line
Fixes 41040cf7c5f0 ("arm64/sve: Fix missing SVE/FPSIMD endianness conversions")I can't see which part of that patch causes the problem, so I'm a bit wary of the fix. We've been using
__uint128_tfor a while now, and I see there's one in the x86 kvm code as well, so it would be nice to understand what's happening here so that we can avoid running into it in future as well.The problem is only in files that export a symbol. This is also the case in
arch/x86/kernel/kvm.c, but it may be lucky because the type only appears /after/ the last export in that file.Quoted 13 lines
Quoted 13 lines
Signed-off-by Arnd Bergmann <[email protected]>--- arch/arm64/kernel/fpsimd.c | 3 +++ 1 file changed, 3 insertions(+)arch/arm64/kernel/fpsimd.c +0
-0@@ -400,6 +400,9 @@ static int __init sve_sysctl_init(void) { return 0; }#define ZREG (sve_state, vq, n) ((char *)(sve_state) + \ (SVE_SIG_ZREG_OFFSET(vq, n) - SVE_SIG_REGS_OFFSET))Quoted 7 lines
arch/arm64/kernel/fpsimd.c static int __init sve_sysctl_init(void) { return 0; } · line 405
Quoted 3 lines
arch/arm64/kernel/fpsimd.c +3
-0+#ifdef __GENKSYMS__ +typedef __u64 __uint128_t [2 ]; +#endif I suspect I need to figure out what genksyms is doing, but I'm nervous about exposing this as an array type without understanding whether or not that has consequences for its operation.
Quoted 6 lines
The entire point is genksyms is to ensure that types of exported symbols are compatible. To do this, it has a limited parser for C source code that understands the basic types (char, int, long,
_Bool, etc) and how to aggregate them into structs and function arguments. This process has always been fragile, and it clearly breaks when it fails to understand a particular type.
Shouldn't the solution for this be to fix genksyms to be less fragile and more understanding? The code base doesn't seem to be full of these sorts of ifdef workarounds.
Quoted 2 lines
Arnd
--
Alex Bennée
Quoted 14 lines · Alex Bennée
Quoted 6 lines · Arnd Bergmann
Quoted 4 lines · Will Deacon
On Mon, Jun 17, 2019 at 12:42:11PM +0200, Arnd Bergmann wrote:
I suspect I need to figure out what genksyms is doing, but I'm nervous about exposing this as an array type without understanding whether or not that has consequences for its operation.Quoted 6 lines
The entire point is genksyms is to ensure that types of exported symbols are compatible. To do this, it has a limited parser for C source code that understands the basic types (char, int, long,
_Bool, etc) and how to aggregate them into structs and function arguments. This process has always been fragile, and it clearly breaks when it fails to understand a particular type.
Quoted 3 lines
Shouldn't the solution for this be to fix genksyms to be less fragile and more understanding? The code base doesn't seem to be full of these sorts of ifdef workarounds.
It is one of the things I tried before I got to the version I send. Unfortunately
the genksyms codebase is a big complex and I quickly got lost in it.
You're welcome to volunteer fixing it though. My main problem was that I couldn't even find out which types exactly are supported, as __uint128_t is not even in the gcc documentation. "unsigned __int128" is a documented type, but is also not in genksyms.
Arnd
Quoted 11 lines · Arnd Bergmann
Quoted 6 lines · Will Deacon
Quoted 2 lines · Arnd Bergmann
genksyms does not understand
__uint128_t, so we get a build failure in the fpsimd module when it cannot export a symbol right:The fpsimd code is builtin, so which module is actually failing? My allmodconfig build succeeds, so I must be missing something.
It happened for me on randconfig builds, you can find one such configuration at https://pastebin.com/cU8iQ4ta now. I was building this with clang rather than gcc, which may affect the issue, but I assumed not.
Hmm, I've failed to reproduce the issue with that config and either GCC (7.1.1 and 8.3.0) or Clang (a flavour of 9.0.0 from a few months ago).
Quoted 42 lines
Quoted 10 lines
Quoted 10 lines
WARNING: EXPORT symbol "
kernel_neon_begin" [vmlinux] version generation failed, symbol will not be versioned./home/arnd/cross/x86_64/gcc-8.1.0-nolibc/aarch64-linux/bin/aarch64-linux-ld:arch/arm64/kernel/fpsimd.o: relocationR_AARCH64_ABS32against `__crc_kernel_neon_begin' can not be used when making a shared object arch/arm64/kernel/fpsimd.o:(.data+0x0): dangerous relocation: unsupported relocation
arch/arm64/kernel/fpsimd.o:(".discard.addressable"+0x0): dangerous relocation: unsupported relocation
arch/arm64/kernel/fpsimd.o:(".discard.addressable"+0x8): dangerous relocation: unsupported relocationWe could teach genksyms about the type, but it's easier to just work around it by defining that type locally in a way that genksyms understands.
Quoted 6 lines
Quoted 1 line
Fixes 41040cf7c5f0 ("arm64/sve: Fix missing SVE/FPSIMD endianness conversions")I can't see which part of that patch causes the problem, so I'm a bit wary of the fix. We've been using
__uint128_tfor a while now, and I see there's one in the x86 kvm code as well, so it would be nice to understand what's happening here so that we can avoid running into it in future as well.The problem is only in files that export a symbol. This is also the case in
arch/x86/kernel/kvm.c, but it may be lucky because the type only appears /after/ the last export in that file.Quoted 13 lines
Quoted 13 lines
Signed-off-by Arnd Bergmann <[email protected]>--- arch/arm64/kernel/fpsimd.c | 3 +++ 1 file changed, 3 insertions(+)arch/arm64/kernel/fpsimd.c +0
-0@@ -400,6 +400,9 @@ static int __init sve_sysctl_init(void) { return 0; }#define ZREG (sve_state, vq, n) ((char *)(sve_state) + \ (SVE_SIG_ZREG_OFFSET(vq, n) - SVE_SIG_REGS_OFFSET))Quoted 7 lines
arch/arm64/kernel/fpsimd.c static int __init sve_sysctl_init(void) { return 0; } · line 405
Quoted 3 lines
arch/arm64/kernel/fpsimd.c +3
-0+#ifdef __GENKSYMS__ +typedef __u64 __uint128_t [2 ]; +#endif I suspect I need to figure out what genksyms is doing, but I'm nervous about exposing this as an array type without understanding whether or not that has consequences for its operation.
Quoted 6 lines
The entire point is genksyms is to ensure that types of exported symbols are compatible. To do this, it has a limited parser for C source code that understands the basic types (char, int, long,
_Bool, etc) and how to aggregate them into structs and function arguments. This process has always been fragile, and it clearly breaks when it fails to understand a particular type.
Ok, but the patch that appears to cause this problem doesn't change the type of anything we're exporting. The symbol in your log is "kernel_neon_begin" which is:
void kernel_neon_begin(void);
so I'm still fairly confused about the problem. In fact, even if I create a silly:
void will_kernel_neon_begin(__uint128_t);
function, then somehow I see it being processed:
__crc_will_kernel_neon_begin = 0x5401d250;
Is there some way that your passing '-w' to genksyms?
Will
Quoted 75 lines · Will Deacon
Quoted 11 lines · Arnd Bergmann
Quoted 6 lines · Will Deacon
Quoted 2 lines · Arnd Bergmann
genksyms does not understand
__uint128_t, so we get a build failure in the fpsimd module when it cannot export a symbol right:The fpsimd code is builtin, so which module is actually failing? My allmodconfig build succeeds, so I must be missing something.
It happened for me on randconfig builds, you can find one such configuration at https://pastebin.com/cU8iQ4ta now. I was building this with clang rather than gcc, which may affect the issue, but I assumed not.
Hmm, I've failed to reproduce the issue with that config and either GCC (7.1.1 and 8.3.0) or Clang (a flavour of 9.0.0 from a few months ago).
Quoted 42 lines
Quoted 10 lines
Quoted 10 lines
WARNING: EXPORT symbol "
kernel_neon_begin" [vmlinux] version generation failed, symbol will not be versioned./home/arnd/cross/x86_64/gcc-8.1.0-nolibc/aarch64-linux/bin/aarch64-linux-ld:arch/arm64/kernel/fpsimd.o: relocationR_AARCH64_ABS32against `__crc_kernel_neon_begin' can not be used when making a shared object arch/arm64/kernel/fpsimd.o:(.data+0x0): dangerous relocation: unsupported relocation
arch/arm64/kernel/fpsimd.o:(".discard.addressable"+0x0): dangerous relocation: unsupported relocation
arch/arm64/kernel/fpsimd.o:(".discard.addressable"+0x8): dangerous relocation: unsupported relocationWe could teach genksyms about the type, but it's easier to just work around it by defining that type locally in a way that genksyms understands.
Quoted 6 lines
Quoted 1 line
Fixes 41040cf7c5f0 ("arm64/sve: Fix missing SVE/FPSIMD endianness conversions")I can't see which part of that patch causes the problem, so I'm a bit wary of the fix. We've been using
__uint128_tfor a while now, and I see there's one in the x86 kvm code as well, so it would be nice to understand what's happening here so that we can avoid running into it in future as well.The problem is only in files that export a symbol. This is also the case in
arch/x86/kernel/kvm.c, but it may be lucky because the type only appears /after/ the last export in that file.Quoted 13 lines
Quoted 13 lines
Signed-off-by Arnd Bergmann <[email protected]>--- arch/arm64/kernel/fpsimd.c | 3 +++ 1 file changed, 3 insertions(+)arch/arm64/kernel/fpsimd.c +0
-0@@ -400,6 +400,9 @@ static int __init sve_sysctl_init(void) { return 0; }#define ZREG (sve_state, vq, n) ((char *)(sve_state) + \ (SVE_SIG_ZREG_OFFSET(vq, n) - SVE_SIG_REGS_OFFSET))Quoted 7 lines
arch/arm64/kernel/fpsimd.c static int __init sve_sysctl_init(void) { return 0; } · line 405
Quoted 3 lines
arch/arm64/kernel/fpsimd.c +3
-0+#ifdef __GENKSYMS__ +typedef __u64 __uint128_t [2 ]; +#endif I suspect I need to figure out what genksyms is doing, but I'm nervous about exposing this as an array type without understanding whether or not that has consequences for its operation.
Quoted 6 lines
The entire point is genksyms is to ensure that types of exported symbols are compatible. To do this, it has a limited parser for C source code that understands the basic types (char, int, long,
_Bool, etc) and how to aggregate them into structs and function arguments. This process has always been fragile, and it clearly breaks when it fails to understand a particular type.Ok, but the patch that appears to cause this problem doesn't change the type of anything we're exporting. The symbol in your log is "
kernel_neon_begin" which is:void kernel_neon_begin(void);so I'm still fairly confused about the problem. In fact, even if I create a silly:
Quoted 8 lines
void will_kernel_neon_begin(__uint128_t);function, then somehow I see it being processed:
__crc_will_kernel_neon_begin = 0x5401d250;Is there some way that your passing '-w' to genksyms?
The problem is not about the types we're *exporting*. Genksyms just gives up halfway through the file, as soon as it encounters something it doesn't like, and any symbol that hasn't been encountered yet at that point will not have a crc generated for it.
Quoted 42 lines · Ard Biesheuvel
Quoted 41 lines · Will Deacon
Quoted 18 lines · Arnd Bergmann
Quoted 9 lines · Will Deacon
Quoted 8 lines · Arnd Bergmann
arch/arm64/kernel/fpsimd.c +0
-0@@ -400,6 +400,9 @@ static int __init sve_sysctl_init(void) { return 0; }#define ZREG (sve_state, vq, n) ((char *)(sve_state) + \ (SVE_SIG_ZREG_OFFSET(vq, n) - SVE_SIG_REGS_OFFSET))Quoted 7 lines
arch/arm64/kernel/fpsimd.c static int __init sve_sysctl_init(void) { return 0; } · line 405
Quoted 3 lines
arch/arm64/kernel/fpsimd.c +3
-0+#ifdef __GENKSYMS__ +typedef __u64 __uint128_t [2 ]; +#endif I suspect I need to figure out what genksyms is doing, but I'm nervous about exposing this as an array type without understanding whether or not that has consequences for its operation.
Quoted 6 lines
The entire point is genksyms is to ensure that types of exported symbols are compatible. To do this, it has a limited parser for C source code that understands the basic types (char, int, long,
_Bool, etc) and how to aggregate them into structs and function arguments. This process has always been fragile, and it clearly breaks when it fails to understand a particular type.Ok, but the patch that appears to cause this problem doesn't change the type of anything we're exporting. The symbol in your log is "
kernel_neon_begin" which is:void kernel_neon_begin(void);so I'm still fairly confused about the problem. In fact, even if I create a silly:
void will_kernel_neon_begin(__uint128_t);function, then somehow I see it being processed:
__crc_will_kernel_neon_begin = 0x5401d250;
Quoted 7 lines
Quoted 2 lines
Is there some way that your passing '-w' to genksyms?
The problem is not about the types we're *exporting*. Genksyms just gives up halfway through the file, as soon as it encounters something it doesn't like, and any symbol that hasn't been encountered yet at that point will not have a crc generated for it.
Hmm, but it appears to be either working or failing silently for me, which doesn't match what Arnd is seeing. I'd prefer to fix genksyms but I'm not happy touching it if I can't show it's broken to begin with. If I pass '-w' I see it barfing on all sorts of random stuff, for example the static_assert in include/linux/fs.h:
static_assert(offsetof(struct filename, iname) % sizeof(long) == 0);
Will
Hi Arnd, Ard,
Quoted 6 lines · Will Deacon
Quoted 4 lines · Ard Biesheuvel
The problem is not about the types we're *exporting*. Genksyms just gives up halfway through the file, as soon as it encounters something it doesn't like, and any symbol that hasn't been encountered yet at that point will not have a crc generated for it.
Quoted 7 lines
Hmm, but it appears to be either working or failing silently for me, which doesn't match what Arnd is seeing. I'd prefer to fix genksyms but I'm not happy touching it if I can't show it's broken to begin with. If I pass '-w' I see it barfing on all sorts of random stuff, for example the
static_assertininclude/linux/fs.h:static_assert(offsetof(struct filename, iname) % sizeof(long) == 0);
Ok, I had some more fun with this today. First of all, we needed a new .config, but also, the issue only appears with linux-next. With that configuration, I can hit the issue.
What seems to occur is that when parsing:
static __uint128_t arm64_cpu_to_le128(__uint128_t x)
{
u64 a = swab64(x);
u64 b = swab64(x >> 64);
return ((__uint128_t)a << 64) | b;
}in fpsimd.c, then genksyms doesn't treate __uint128_t as a type and therefore fails to figure out that this is a function. Consequently, it keeps trying (and failing) to parse until it sees the end of the current expression. This happens when it hits:
EXPORT_SYMBOL(kernel_neon_begin);
thanks to the semi-colon.
So one nasty bodge to fix this is:
arch/arm64/kernel/fpsimd.c +2 -0
@@ -368,6 +368,8 @@ static __uint128_t arm64_cpu_to_le128(__uint128_t x) }#endif +short of_fixing_genksyms_we_must_use_this_hack; +#define arm64_le128_to_cpu (x) arm64_cpu_to_le128(x)/*
but actually, I think I've managed to hack genksyms itself. Patch below.
Will
--->8
From 6e004b8824d4eb6a4e61cd794fbc3a761b50135b Mon Sep 17 00:00:00 2001
From: Will Deacon <[email protected]>
Date: Tue, 18 Jun 2019 12:56:49 +0100
Subject: [PATCH] genksyms: Teach parse about __uint128_t built-in type
__uint128_t crops up in a few files that export symbols to modules, so teach genksyms about it so that we don't end up skipping the CRC generation for some symbols due to the parser failing to spot them:
| WARNING: EXPORT symbol "kernel_neon_begin" [vmlinux] version | generation failed, symbol will not be versioned. | ld: arch/arm64/kernel/fpsimd.o: relocation R_AARCH64_ABS32 against | `__crc_kernel_neon_begin' can not be used when making a shared | object | ld: arch/arm64/kernel/fpsimd.o:(.data+0x0): dangerous relocation: | unsupported relocation
--- scripts/genksyms/keywords.c | 1 + scripts/genksyms/parse.y | 2 ++ 2 files changed, 3 insertions(+)
scripts/genksyms/keywords.c +1 -0
@@ -53,6 +53,7 @@ static struct resword { { "struct", STRUCT_KEYW }, { "typedef", TYPEDEF_KEYW }, { "typeof", TYPEOF_KEYW }, + { "__uint128_t", BUILTIN_INT_KEYW }, { "union", UNION_KEYW }, { "unsigned", UNSIGNED_KEYW }, { "void", VOID_KEYW },
scripts/genksyms/parse.y +2 -0
@@ -76,6 +76,7 @@ static void record_compound(struct string_list **keyw, %token ATTRIBUTE_KEYW %token AUTO_KEYW %token BOOL_KEYW +%token BUILTIN_INT_KEYW %token CHAR_KEYW %token CONST_KEYW %token DOUBLE_KEYW
@@ -263,6 +264,7 @@ simple_type_specifier: | VOID_KEYW | BOOL_KEYW | VA_LIST_KEYW + | BUILTIN_INT_KEYW | TYPE { (*$1)->tag = SYM_TYPEDEF; $$ = $1; } ;
Signature · 1 line
2.11.0
Arnd Bergmann
Acked-byQuoted 18 lines · Will Deacon
From
6e004b8824d4eb6a4e61cd794fbc3a761b50135bMon Sep 17 00:00:00 2001
From: Will Deacon <[email protected]>
Date: Tue, 18 Jun 2019 12:56:49 +0100
Subject: [PATCH] genksyms: Teach parse about__uint128_tbuilt-in type
__uint128_tcrops up in a few files that export symbols to modules, so teach genksyms about it so that we don't end up skipping the CRC generation for some symbols due to the parser failing to spot them:| WARNING: EXPORT symbol "kernel_neon_begin" [vmlinux] version | generation failed, symbol will not be versioned. | ld: arch/arm64/kernel/fpsimd.o: relocation R_AARCH64_ABS32 against | `__crc_kernel_neon_begin' can not be used when making a shared | object | ld: arch/arm64/kernel/fpsimd.o:(.data+0x0): dangerous relocation: | unsupported relocation
Quoted 3 lines
Cc Ard Biesheuvel <[email protected]>Reported-by Arnd Bergmann <[email protected]>Signed-off-by Will Deacon <[email protected]>
Looks good to me,
I've added this to my randconfig build setup, replacing my earlier patch, and will let you know if any problems with it remain.
Arnd
Quoted 23 lines · Arnd Bergmann
Quoted 18 lines · Will Deacon
From
6e004b8824d4eb6a4e61cd794fbc3a761b50135bMon Sep 17 00:00:00 2001
From: Will Deacon <[email protected]>
Date: Tue, 18 Jun 2019 12:56:49 +0100
Subject: [PATCH] genksyms: Teach parse about__uint128_tbuilt-in type
__uint128_tcrops up in a few files that export symbols to modules, so teach genksyms about it so that we don't end up skipping the CRC generation for some symbols due to the parser failing to spot them:| WARNING: EXPORT symbol "kernel_neon_begin" [vmlinux] version | generation failed, symbol will not be versioned. | ld: arch/arm64/kernel/fpsimd.o: relocation R_AARCH64_ABS32 against | `__crc_kernel_neon_begin' can not be used when making a shared | object | ld: arch/arm64/kernel/fpsimd.o:(.data+0x0): dangerous relocation: | unsupported relocationQuoted 3 lines
Cc Ard Biesheuvel <[email protected]>Reported-by Arnd Bergmann <[email protected]>Signed-off-by Will Deacon <[email protected]>
Quoted 9 lines
Looks good to me,
Acked-by Arnd Bergmann <[email protected]>I've added this to my randconfig build setup, replacing my earlier patch, and will let you know if any problems with it remain.
Arnd
I just hit this on 5ad18b2e60b75c7297a998dea702451d33a052ed on Linus' branch. The fix works for me (feel free to add Tested-by). Is this already queued up for Linus?
Thanks,
Laura
Will Deacon
maintainerHi Laura, [+Masahiro]
Quoted 27 lines · Laura Abbott
Quoted 26 lines · Arnd Bergmann
Quoted 17 lines · Will Deacon
From
6e004b8824d4eb6a4e61cd794fbc3a761b50135bMon Sep 17 00:00:00 2001
From: Will Deacon <[email protected]>
Date: Tue, 18 Jun 2019 12:56:49 +0100
Subject: [PATCH] genksyms: Teach parse about__uint128_tbuilt-in type
__uint128_tcrops up in a few files that export symbols to modules, so teach genksyms about it so that we don't end up skipping the CRC generation for some symbols due to the parser failing to spot them:| WARNING: EXPORT symbol "kernel_neon_begin" [vmlinux] version | generation failed, symbol will not be versioned. | ld: arch/arm64/kernel/fpsimd.o: relocation R_AARCH64_ABS32 against | `__crc_kernel_neon_begin' can not be used when making a shared | object | ld: arch/arm64/kernel/fpsimd.o:(.data+0x0): dangerous relocation: | unsupported relocationQuoted 3 lines
Cc Ard Biesheuvel <[email protected]>Reported-by Arnd Bergmann <[email protected]>Signed-off-by Will Deacon <[email protected]>Looks good to me,
Acked-by Arnd Bergmann <[email protected]>
Quoted 7 lines
Quoted 3 lines
I've added this to my randconfig build setup, replacing my earlier patch, and will let you know if any problems with it remain.
I just hit this on
5ad18b2e60b75c7297a998dea702451d33a052edon Linus' branch. The fix works for me (feel free to add Tested-by). Is this already queued up for Linus?
I think there's a fix queued via the kbuild tree:
https://lkml.kernel.org/r/CAK7LNAQRMnovWQA0F8A6mEqDjPxXOGM-1AHoyh1gQa367f+FqQ@mail.gmail.com
Will
Quoted 39 lines · Will Deacon
Hi Laura, [+Masahiro]
Quoted 27 lines · Laura Abbott
Quoted 26 lines · Arnd Bergmann
Quoted 17 lines · Will Deacon
From
6e004b8824d4eb6a4e61cd794fbc3a761b50135bMon Sep 17 00:00:00 2001
From: Will Deacon <[email protected]>
Date: Tue, 18 Jun 2019 12:56:49 +0100
Subject: [PATCH] genksyms: Teach parse about__uint128_tbuilt-in type
__uint128_tcrops up in a few files that export symbols to modules, so teach genksyms about it so that we don't end up skipping the CRC generation for some symbols due to the parser failing to spot them:| WARNING: EXPORT symbol "kernel_neon_begin" [vmlinux] version | generation failed, symbol will not be versioned. | ld: arch/arm64/kernel/fpsimd.o: relocation R_AARCH64_ABS32 against | `__crc_kernel_neon_begin' can not be used when making a shared | object | ld: arch/arm64/kernel/fpsimd.o:(.data+0x0): dangerous relocation: | unsupported relocationQuoted 3 lines
Cc Ard Biesheuvel <[email protected]>Reported-by Arnd Bergmann <[email protected]>Signed-off-by Will Deacon <[email protected]>Looks good to me,
Acked-by Arnd Bergmann <[email protected]>Quoted 7 lines
Quoted 3 lines
I've added this to my randconfig build setup, replacing my earlier patch, and will let you know if any problems with it remain.
I just hit this on
5ad18b2e60b75c7297a998dea702451d33a052edon Linus' branch. The fix works for me (feel free to add Tested-by). Is this already queued up for Linus?
Quoted 5 lines
I think there's a fix queued via the kbuild tree:
https://lkml.kernel.org/r/CAK7LNAQRMnovWQA0F8A6mEqDjPxXOGM-1AHoyh1gQa367f+FqQ@mail.gmail.com
Will
Yes, I will send a pull request shortly.
Signature · 2 lines
Best Regards Masahiro Yamada