[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABVgOSko2FDCgEhCBD4Nm5ExEa9vLQrRiHMh+89nPYjqGjegFw@mail.gmail.com>
Date: Tue, 15 Sep 2020 12:03:08 +0800
From: David Gow <davidgow@...gle.com>
To: Stephen Rothwell <sfr@...b.auug.org.au>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Patricia Alfonso <trishalfonso@...gle.com>,
Linux Next Mailing List <linux-next@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
kasan-dev <kasan-dev@...glegroups.com>,
KUnit Development <kunit-dev@...glegroups.com>
Subject: Re: linux-next: build warning after merge of the akpm-current tree
[+kasan-dev, +kunit-dev]
On Mon, Sep 14, 2020 at 3:01 PM Stephen Rothwell <sfr@...b.auug.org.au> wrote:
>
> Hi all,
>
> After merging the akpm-current tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
>
> In file included from lib/test_kasan_module.c:16:
> lib/../mm/kasan/kasan.h:232:6: warning: conflicting types for built-in function '__asan_register_globals'; expected 'void(void *, long int)' [-Wbuiltin-declaration-mismatch]
> 232 | void __asan_register_globals(struct kasan_global *globals, size_t size);
> | ^~~~~~~~~~~~~~~~~~~~~~~
> lib/../mm/kasan/kasan.h:233:6: warning: conflicting types for built-in function '__asan_unregister_globals'; expected 'void(void *, long int)' [-Wbuiltin-declaration-mismatch]
> 233 | void __asan_unregister_globals(struct kasan_global *globals, size_t size);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~
> lib/../mm/kasan/kasan.h:235:6: warning: conflicting types for built-in function '__asan_alloca_poison'; expected 'void(void *, long int)' [-Wbuiltin-declaration-mismatch]
> 235 | void __asan_alloca_poison(unsigned long addr, size_t size);
> | ^~~~~~~~~~~~~~~~~~~~
> lib/../mm/kasan/kasan.h:236:6: warning: conflicting types for built-in function '__asan_allocas_unpoison'; expected 'void(void *, long int)' [-Wbuiltin-declaration-mismatch]
> 236 | void __asan_allocas_unpoison(const void *stack_top, const void *stack_bottom);
> | ^~~~~~~~~~~~~~~~~~~~~~~
> lib/../mm/kasan/kasan.h:238:6: warning: conflicting types for built-in function '__asan_load1'; expected 'void(void *)' [-Wbuiltin-declaration-mismatch]
> 238 | void __asan_load1(unsigned long addr);
> | ^~~~~~~~~~~~
[...some more similar warnings truncated...]
Whoops -- these are an issue with the patch: the test_kasan_module.c
file should be built with -fno-builtin. I've out a new version of the
series which fixes this:
https://lore.kernel.org/linux-mm/20200915035828.570483-1-davidgow@google.com/T/#t
Basically, the fix is just:
diff --git a/lib/Makefile b/lib/Makefile
index 8c94cad26db7..d4af75136c54 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -69,6 +69,7 @@ obj-$(CONFIG_KASAN_KUNIT_TEST) += test_kasan.o
CFLAGS_test_kasan.o += -fno-builtin
CFLAGS_test_kasan.o += $(call cc-disable-warning, vla)
obj-$(CONFIG_TEST_KASAN_MODULE) += test_kasan_module.o
+CFLAGS_test_kasan_module.o += -fno-builtin
obj-$(CONFIG_TEST_UBSAN) += test_ubsan.o
CFLAGS_test_ubsan.o += $(call cc-disable-warning, vla)
UBSAN_SANITIZE_test_ubsan.o := y
--
2.28.0.618.gf4bc123cb7-goog
> drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c: In function 'common_nfc_set_geometry':
> drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c:514:3: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
> 514 | nanddev_get_ecc_requirements(&chip->base);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
I was unable to reproduce this warning: it looks unrelated, so I'm
assuming it was attributed.
> Introduced by commit
>
> 77e7d1c8c356 ("KASAN: Port KASAN Tests to KUnit")
>
> --
> Cheers,
> Stephen Rothwell
Sorry for the mess,
-- David
Powered by blists - more mailing lists