* next-20201105 - build issue with KASAN on ARM
@ 2020-11-07 18:33 Valdis Klētnieks
2020-11-07 20:04 ` Nathan Chancellor
0 siblings, 1 reply; 7+ messages in thread
From: Valdis Klētnieks @ 2020-11-07 18:33 UTC (permalink / raw)
To: Linus Walleij, Andrey Ryabinin; +Cc: linux-arm-kernel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1023 bytes --]
commit d6d51a96c7d63b7450860a3037f2d62388286a52
Author: Linus Walleij <linus.walleij@linaro.org>
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.o
arch/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
[-- Attachment #2: Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: next-20201105 - build issue with KASAN on ARM
2020-11-07 18:33 next-20201105 - build issue with KASAN on ARM Valdis Klētnieks
@ 2020-11-07 20:04 ` Nathan Chancellor
2020-11-08 22:19 ` Stephen Rothwell
0 siblings, 1 reply; 7+ messages in thread
From: Nathan Chancellor @ 2020-11-07 20:04 UTC (permalink / raw)
To: Valdis Klētnieks
Cc: Linus Walleij, Andrey Ryabinin, linux-arm-kernel, linux-kernel,
Stephen Rothwell, linux-next
Hi Valdis,
On Sat, Nov 07, 2020 at 01:33:20PM -0500, Valdis Klētnieks wrote:
> commit d6d51a96c7d63b7450860a3037f2d62388286a52
> Author: Linus Walleij <linus.walleij@linaro.org>
> 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.....
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.
> CC arch/arm/boot/compressed/string.o
> arch/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
>
Cheers,
Nathan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: next-20201105 - build issue with KASAN on ARM
2020-11-07 20:04 ` Nathan Chancellor
@ 2020-11-08 22:19 ` Stephen Rothwell
2020-11-08 22:21 ` Nathan Chancellor
0 siblings, 1 reply; 7+ messages in thread
From: Stephen Rothwell @ 2020-11-08 22:19 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Valdis Klētnieks, Linus Walleij, Andrey Ryabinin,
linux-arm-kernel, linux-kernel, linux-next, Andrew Morton
[-- Attachment #1: Type: text/plain, Size: 907 bytes --]
Hi Nathan,
On Sat, 7 Nov 2020 13:04:53 -0700 Nathan Chancellor <natechancellor@gmail.com> wrote:
>
> 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).
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: next-20201105 - build issue with KASAN on ARM
2020-11-08 22:19 ` Stephen Rothwell
@ 2020-11-08 22:21 ` Nathan Chancellor
2020-11-09 0:17 ` [PATCH] ARM: boot: Quote aliased symbol names in string.c Nathan Chancellor
0 siblings, 1 reply; 7+ messages in thread
From: Nathan Chancellor @ 2020-11-08 22:21 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Valdis Klētnieks, Linus Walleij, Andrey Ryabinin,
linux-arm-kernel, linux-kernel, linux-next, Andrew Morton
Hi Stephen,
On Mon, Nov 09, 2020 at 09:19:19AM +1100, Stephen Rothwell wrote:
> Hi Nathan,
>
> On Sat, 7 Nov 2020 13:04:53 -0700 Nathan Chancellor <natechancellor@gmail.com> wrote:
> >
> > 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).
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] ARM: boot: Quote aliased symbol names in string.c
2020-11-08 22:21 ` Nathan Chancellor
@ 2020-11-09 0:17 ` Nathan Chancellor
2020-11-09 7:40 ` Ard Biesheuvel
2020-11-09 16:04 ` Linus Walleij
0 siblings, 2 replies; 7+ messages in thread
From: Nathan Chancellor @ 2020-11-09 0:17 UTC (permalink / raw)
To: Andrew Morton
Cc: Abbott Liu, Ahmad Fatoum, Andrey Ryabinin, Ard Biesheuvel,
Florian Fainelli, Linus Walleij, Joe Perches, Russell King,
Stephen Rothwell, kasan-dev, linux-arm-kernel, linux-mm,
linux-next, linux-kernel, Nathan Chancellor, Naresh Kamboju,
Valdis Klētnieks
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.
Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Reported-by: Valdis Klētnieks <valdis.kletnieks@vt.edu>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
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(-)
diff --git a/arch/arm/boot/compressed/string.c b/arch/arm/boot/compressed/string.c
index 8c0fa276d994..cc6198f8a348 100644
--- a/arch/arm/boot/compressed/string.c
+++ b/arch/arm/boot/compressed/string.c
@@ -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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] ARM: boot: Quote aliased symbol names in string.c
2020-11-09 0:17 ` [PATCH] ARM: boot: Quote aliased symbol names in string.c Nathan Chancellor
@ 2020-11-09 7:40 ` Ard Biesheuvel
2020-11-09 16:04 ` Linus Walleij
1 sibling, 0 replies; 7+ messages in thread
From: Ard Biesheuvel @ 2020-11-09 7:40 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Andrew Morton, Abbott Liu, Ahmad Fatoum, Andrey Ryabinin,
Florian Fainelli, Linus Walleij, Joe Perches, Russell King,
Stephen Rothwell, kasan-dev, Linux ARM,
Linux Memory Management List, Linux Next Mailing List,
Linux Kernel Mailing List, Naresh Kamboju, Valdis Klētnieks
On Mon, 9 Nov 2020 at 01:19, Nathan Chancellor <natechancellor@gmail.com> wrote:
>
> 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.
>
> Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
> Reported-by: Valdis Klētnieks <valdis.kletnieks@vt.edu>
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
> ---
>
> 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(-)
>
> diff --git a/arch/arm/boot/compressed/string.c b/arch/arm/boot/compressed/string.c
> index 8c0fa276d994..cc6198f8a348 100644
> --- a/arch/arm/boot/compressed/string.c
> +++ b/arch/arm/boot/compressed/string.c
> @@ -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
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] ARM: boot: Quote aliased symbol names in string.c
2020-11-09 0:17 ` [PATCH] ARM: boot: Quote aliased symbol names in string.c Nathan Chancellor
2020-11-09 7:40 ` Ard Biesheuvel
@ 2020-11-09 16:04 ` Linus Walleij
1 sibling, 0 replies; 7+ messages in thread
From: Linus Walleij @ 2020-11-09 16:04 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Andrew Morton, Abbott Liu, Ahmad Fatoum, Andrey Ryabinin,
Ard Biesheuvel, Florian Fainelli, Joe Perches, Russell King,
Stephen Rothwell, kasan-dev, Linux ARM,
Linux Memory Management List, Linux-Next Mailing List,
linux-kernel, Naresh Kamboju, Valdis Klētnieks
On Mon, Nov 9, 2020 at 1:19 AM Nathan Chancellor
<natechancellor@gmail.com> wrote:
> 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.
>
> Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
> Reported-by: Valdis Klētnieks <valdis.kletnieks@vt.edu>
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
> 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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-11-09 16:04 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-07 18:33 next-20201105 - build issue with KASAN on ARM Valdis Klētnieks
2020-11-07 20:04 ` Nathan Chancellor
2020-11-08 22:19 ` Stephen Rothwell
2020-11-08 22:21 ` Nathan Chancellor
2020-11-09 0:17 ` [PATCH] ARM: boot: Quote aliased symbol names in string.c Nathan Chancellor
2020-11-09 7:40 ` Ard Biesheuvel
2020-11-09 16:04 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).