next-20201105 - build issue with KASAN on ARM
Subsystems (3)
commit d6d51a96c7d63b7450860a3037f2d62388286a52
Author: Linus Walleij <[email protected]> Date: Sun Oct 25 23:52:08 2020 +0100
ARM: 9014/2: Replace string mem* functions for KASan
I'm trying to figure out why this has 3 Tested-By: tags but blows up for fairly obvious reasons on ARM.....
CC arch/arm/boot/compressed/string.oarch/arm/boot/compressed/string.c:24:1: error: attribute 'alias' argument not a string
void *__memcpy(void *__dest, __const void *__src, size_t __n) __alias(memcpy); ^~~~arch/arm/boot/compressed/string.c:25:1: error: attribute 'alias' argument not a string
void *__memmove(void *__dest, __const void *__src, size_t count) __alias(memmove); ^~~~arch/arm/boot/compressed/string.c:26:1: error: attribute 'alias' argument not a string
void *__memset(void *s, int c, size_t count) __alias(memset);
^~~~
make[2]: *** [scripts/Makefile.build:283: arch/arm/boot/compressed/string.o] Error 1 make[1]: *** [arch/arm/boot/Makefile:64: arch/arm/boot/compressed/vmlinux] Error 2
Hi Valdis,
Quoted 8 lines · Valdis Klētnieks
commit
d6d51a96c7d63b7450860a3037f2d62388286a52Author: Linus Walleij <[email protected]> Date: Sun Oct 25 23:52:08 2020 +0100ARM: 9014/2: Replace string mem* functions for KASan
I'm trying to figure out why this has 3 Tested-By: tags but blows up for fairly obvious reasons on ARM.....
Because it builds fine if you check out Russell's branch. This build error only happens because of a treewide change in -mm that was applied after the ARM merge:
https://lore.kernel.org/linux-arm-kernel/20201106094434.GA3268933@ubuntu-m3-large-x86/
https://lore.kernel.org/linux-arm-kernel/20201106180929.GD2959494@ubuntu-m3-large-x86/
Stephen could apply that diff as a fixup for the -mm patch when he builds -next or I can send it as a formal patch for him to apply.
Quoted 4 lines
CC
arch/arm/boot/compressed/string.oarch/arm/boot/compressed/string.c:24:1: error: attribute 'alias' argument not a string
void *__memcpy(void*__dest,__constvoid*__src,size_t__n)__alias(memcpy); ^~~~
Quoted 9 lines
arch/arm/boot/compressed/string.c:25:1: error: attribute 'alias' argument not a string
void *__memmove(void*__dest,__constvoid*__src,size_tcount)__alias(memmove); ^~~~arch/arm/boot/compressed/string.c:26:1: error: attribute 'alias' argument not a string
void *__memset(void *s, int c,size_tcount)__alias(memset);
^~~~
make[2]: *** [scripts/Makefile.build:283:arch/arm/boot/compressed/string.o] Error 1 make[1]: *** [arch/arm/boot/Makefile:64:arch/arm/boot/compressed/vmlinux] Error 2
Cheers,
Nathan
Hi Nathan,
Quoted 11 lines · On Sat, 7 Nov 2020 13:04:53 -0700 Nathan Chancellor <[email protected]>…
Because it builds fine if you check out Russell's branch. This build error only happens because of a treewide change in -mm that was applied after the ARM merge:
https://lore.kernel.org/linux-arm-kernel/20201106094434.GA3268933@ubuntu-m3-large-x86/
https://lore.kernel.org/linux-arm-kernel/20201106180929.GD2959494@ubuntu-m3-large-x86/
Stephen could apply that diff as a fixup for the -mm patch when he builds -next or I can send it as a formal patch for him to apply.
I have applied the patch by hand today, but please send a patch to Andrew pointing out that it should go in his post -next series (or possibly he should also move treewide-remove-stringification-from-__alias-macro-definition.patch into the post -next series).
Signature · 2 lines
Cheers, Stephen Rothwell
Hi Stephen,
Quoted 12 lines · Stephen Rothwell
Hi Nathan,
Quoted 9 lines · On Sat, 7 Nov 2020 13:04:53 -0700 Nathan Chancellor <[email protected]>…
Because it builds fine if you check out Russell's branch. This build error only happens because of a treewide change in -mm that was applied after the ARM merge:
https://lore.kernel.org/linux-arm-kernel/20201106094434.GA3268933@ubuntu-m3-large-x86/
https://lore.kernel.org/linux-arm-kernel/20201106180929.GD2959494@ubuntu-m3-large-x86/
Quoted 8 lines
Quoted 2 lines
Stephen could apply that diff as a fixup for the -mm patch when he builds -next or I can send it as a formal patch for him to apply.
I have applied the patch by hand today, but please send a patch to Andrew pointing out that it should go in his post -next series (or possibly he should also move treewide-remove-stringification-from-__alias-macro-definition.patch into the post -next series).
Ack, thank you for the guidance, as I am unsure how exactly contexual changes like this are supposed to be handled when dealing with a quilt series. I will send a formal patch soon.
Cheers,
Nathan
PATCH 1/1 ARM: boot: Quote aliased symbol names in string.c
Patch "treewide: Remove stringification from __alias macro definition" causes arguments to __alias to no longer be quoted automatically, which breaks CONFIG_KASAN on ARM after commit d6d51a96c7d6 ("ARM: 9014/2:
Replace string mem* functions for KASan"):
arch/arm/boot/compressed/string.c:24:1: error: attribute 'alias' argument not a string
24 | void *__memcpy(void *__dest, __const void *__src, size_t __n) __alias(memcpy);
| ^~~~
arch/arm/boot/compressed/string.c:25:1: error: attribute 'alias' argument not a string
25 | void *__memmove(void *__dest, __const void *__src, size_t count) __alias(memmove);
| ^~~~
arch/arm/boot/compressed/string.c:26:1: error: attribute 'alias' argument not a string
26 | void *__memset(void *s, int c, size_t count) __alias(memset);
| ^~~~make[3]: *** [scripts/Makefile.build:283: arch/arm/boot/compressed/string.o] Error 1
Quote the names like the treewide patch does so there is no more error.
---
Hi Andrew,
Stephen said I should send this along to you so that it can be applied as part of the post -next series. Please let me know if you need any more information or clarification, I tried to document it succinctly in the commit message.
Cheers,
Nathan
arch/arm/boot/compressed/string.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/boot/compressed/string.c +3 -3
@@ -21,9 +21,9 @@#undef memcpy#undef memmove#undef memset -void *__memcpy(void *__dest, __const void *__src, size_t __n) __alias(memcpy); -void *__memmove(void *__dest, __const void *__src, size_t count) __alias(memmove); -void *__memset (void *s,int c,size_t count)__alias (memset); +void *__memcpy(void *__dest, __const void *__src, size_t __n) __alias("memcpy"); +void *__memmove(void *__dest, __const void *__src, size_t count) __alias("memmove"); +void *__memset(void *s, int c, size_t count) __alias("memset");#endif void *memcpy(void *__dest, __const void *__src, size_t __n)
Signature · 1 line
2.29.2
Re: [PATCH] ARM: boot: Quote aliased symbol names in string.c
Quoted 15 lines · Nathan Chancellor
Patch "treewide: Remove stringification from
__aliasmacro definition" causes arguments to__aliasto no longer be quoted automatically, which breaksCONFIG_KASANon ARM after commitd6d51a96c7d6("ARM: 9014/2:
Replace string mem* functions for KASan"):
arch/arm/boot/compressed/string.c:24:1: error: attribute 'alias' argument not a string24 | void *__memcpy(void *__dest, __const void *__src, size_t __n) __alias(memcpy); | ^~~~ arch/arm/boot/compressed/string.c:25:1: error: attribute 'alias' argument not a string 25 | void *__memmove(void *__dest, __const void *__src, size_t count) __alias(memmove); | ^~~~ arch/arm/boot/compressed/string.c:26:1: error: attribute 'alias' argument not a string 26 | void *__memset(void *s, int c, size_t count) __alias(memset); | ^~~~
Quoted 7 lines
make[3]: *** [
scripts/Makefile.build:283:arch/arm/boot/compressed/string.o] Error 1Quote the names like the treewide patch does so there is no more error.
Reported-by Naresh Kamboju <[email protected]>Reported-by Valdis Klētnieks <[email protected]>Signed-off-by Nathan Chancellor <[email protected]>
Quoted 35 lines
---
Hi Andrew,
Stephen said I should send this along to you so that it can be applied as part of the post -next series. Please let me know if you need any more information or clarification, I tried to document it succinctly in the commit message.
Cheers,
Nathanarch/arm/boot/compressed/string.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)arch/arm/boot/compressed/string.c +3
-4@@ -21,9 +21,9 @@#undef memcpy#undef memmove#undef memset -void *__memcpy(void *__dest, __const void *__src, size_t __n) __alias(memcpy); -void *__memmove(void *__dest, __const void *__src, size_t count) __alias(memmove); -void *__memset (void *s,int c,size_t count)__alias (memset); +void *__memcpy(void *__dest, __const void *__src, size_t __n) __alias("memcpy"); +void *__memmove(void *__dest, __const void *__src, size_t count) __alias("memmove"); +void *__memset(void *s, int c, size_t count) __alias("memset");#endif void *memcpy(void *__dest, __const void *__src, size_t __n) --2.29.2
Re: [PATCH] ARM: boot: Quote aliased symbol names in string.c
In reply to Nathan ChancellorQuoted 14 lines · Nathan Chancellor
Patch "treewide: Remove stringification from
__aliasmacro definition" causes arguments to__aliasto no longer be quoted automatically, which breaksCONFIG_KASANon ARM after commitd6d51a96c7d6("ARM: 9014/2:
Replace string mem* functions for KASan"):
arch/arm/boot/compressed/string.c:24:1: error: attribute 'alias' argument not a string24 | void *__memcpy(void *__dest, __const void *__src, size_t __n) __alias(memcpy); | ^~~~ arch/arm/boot/compressed/string.c:25:1: error: attribute 'alias' argument not a string 25 | void *__memmove(void *__dest, __const void *__src, size_t count) __alias(memmove); | ^~~~ arch/arm/boot/compressed/string.c:26:1: error: attribute 'alias' argument not a string 26 | void *__memset(void *s, int c, size_t count) __alias(memset); | ^~~~
Quoted 7 lines
make[3]: *** [
scripts/Makefile.build:283:arch/arm/boot/compressed/string.o] Error 1Quote the names like the treewide patch does so there is no more error.
Reported-by Naresh Kamboju <[email protected]>Reported-by Valdis Klētnieks <[email protected]>Signed-off-by Nathan Chancellor <[email protected]>
Quoted 6 lines
Hi Andrew,
Stephen said I should send this along to you so that it can be applied as part of the post -next series. Please let me know if you need any more information or clarification, I tried to document it succinctly in the commit message.
I wasn't even aware that there was such a thing as post-next.
Thanks,
Linus Walleij