The patch titled Subject: lib/ubsan: default UBSAN_ALIGNMENT to not set has been added to the -mm tree. Its filename is lib-ubsan-default-ubsan_alignment-to-not-set.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/lib-ubsan-default-ubsan_alignment-to-not-set.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/lib-ubsan-default-ubsan_alignment-to-not-set.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Anders Roxell <anders.roxell@xxxxxxxxxx> Subject: lib/ubsan: default UBSAN_ALIGNMENT to not set When booting an allmodconfig kernel, there are a lot of false-positives. With a message like this 'UBSAN: Undefined behaviour in...' with a call trace that follows. Reworked so that when building a allmodconfig kernel that turns everything into '=m' or '=y' will turn off UBSAN_ALIGNMENT. Link: http://lkml.kernel.org/r/20181217150326.30933-1-anders.roxell@xxxxxxxxxx Signed-off-by: Anders Roxell <anders.roxell@xxxxxxxxxx> Suggested-by: Arnd Bergmann <arnd@xxxxxxxx> Acked-by: Andrey Ryabinin <aryabinin@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- lib/Kconfig.ubsan | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) --- a/lib/Kconfig.ubsan~lib-ubsan-default-ubsan_alignment-to-not-set +++ a/lib/Kconfig.ubsan @@ -27,15 +27,19 @@ config UBSAN_SANITIZE_ALL Enabling this option will get kernel image size increased significantly. -config UBSAN_ALIGNMENT - bool "Enable checking of pointers alignment" +config UBSAN_NO_ALIGNMENT + bool "Disable checking of pointers alignment" depends on UBSAN - default y if !HAVE_EFFICIENT_UNALIGNED_ACCESS + default y if HAVE_EFFICIENT_UNALIGNED_ACCESS help - This option enables detection of unaligned memory accesses. - Enabling this option on architectures that support unaligned + This option disables the check of unaligned memory accesses. + This option should be used when building allmodconfig. + Disabling this option on architectures that support unaligned accesses may produce a lot of false positives. +config UBSAN_ALIGNMENT + def_bool !UBSAN_NO_ALIGNMENT + config TEST_UBSAN tristate "Module for testing for undefined behavior detection" depends on m && UBSAN _ Patches currently in -mm which might be from anders.roxell@xxxxxxxxxx are kasan-mark-file-common-so-ftrace-doesnt-trace-it.patch lib-ubsan-default-ubsan_alignment-to-not-set.patch