lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201109001712.3384097-1-natechancellor@gmail.com>
Date:   Sun,  8 Nov 2020 17:17:13 -0700
From:   Nathan Chancellor <natechancellor@...il.com>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     Abbott Liu <liuwenliang@...wei.com>,
        Ahmad Fatoum <a.fatoum@...gutronix.de>,
        Andrey Ryabinin <aryabinin@...tuozzo.com>,
        Ard Biesheuvel <ardb@...nel.org>,
        Florian Fainelli <f.fainelli@...il.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Joe Perches <joe@...ches.com>,
        Russell King <linux@...linux.org.uk>,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        kasan-dev@...glegroups.com, linux-arm-kernel@...ts.infradead.org,
        linux-mm@...ck.org, linux-next@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Nathan Chancellor <natechancellor@...il.com>,
        Naresh Kamboju <naresh.kamboju@...aro.org>,
        Valdis Klētnieks <valdis.kletnieks@...edu>
Subject: [PATCH] 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.

Reported-by: Naresh Kamboju <naresh.kamboju@...aro.org>
Reported-by: Valdis Klētnieks <valdis.kletnieks@...edu>
Signed-off-by: Nathan Chancellor <natechancellor@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ