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-next>] [day] [month] [year] [list]
Message-Id: <20230712101344.2714626-1-chenhuacai@loongson.cn>
Date:   Wed, 12 Jul 2023 18:13:44 +0800
From:   Huacai Chen <chenhuacai@...ngson.cn>
To:     Andrey Ryabinin <ryabinin.a.a@...il.com>,
        Alexander Potapenko <glider@...gle.com>
Cc:     Andrey Konovalov <andreyknvl@...il.com>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        Vincenzo Frascino <vincenzo.frascino@....com>,
        Huacai Chen <chenhuacai@...nel.org>,
        kasan-dev@...glegroups.com, linux-kernel@...r.kernel.org,
        Huacai Chen <chenhuacai@...ngson.cn>
Subject: [PATCH] kasan: Fix tests by removing -ffreestanding

CONFIG_CC_HAS_KASAN_MEMINTRINSIC_PREFIX hopes -fbuiltin for memset()/
memcpy()/memmove() if instrumentation is needed. This is the default
behavior but some archs pass -ffreestanding which implies -fno-builtin,
and then causes some kasan tests fail. So we remove -ffreestanding for
kasan tests.

Signed-off-by: Huacai Chen <chenhuacai@...ngson.cn>
---
 mm/kasan/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/mm/kasan/Makefile b/mm/kasan/Makefile
index 7634dd2a6128..edd1977a6b88 100644
--- a/mm/kasan/Makefile
+++ b/mm/kasan/Makefile
@@ -45,7 +45,9 @@ CFLAGS_KASAN_TEST += -fno-builtin
 endif
 
 CFLAGS_kasan_test.o := $(CFLAGS_KASAN_TEST)
+CFLAGS_REMOVE_kasan_test.o := -ffreestanding
 CFLAGS_kasan_test_module.o := $(CFLAGS_KASAN_TEST)
+CFLAGS_REMOVE_kasan_test_module.o := -ffreestanding
 
 obj-y := common.o report.o
 obj-$(CONFIG_KASAN_GENERIC) += init.o generic.o report_generic.o shadow.o quarantine.o
-- 
2.39.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ