From: Andrey Ryabinin <aryabinin@virtuozzo.com>
To: Anders Roxell <anders.roxell@linaro.org>,
Andrew Morton <akpm@linux-foundation.org>
Cc: arnd@arndb.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] lib/ubsan: default UBSAN_ALIGNMENT to not set
Date: Fri, 11 Jan 2019 22:01:16 +0300 [thread overview]
Message-ID: <8bc73bbf-6c12-7fd1-3253-676731bf5ae5@virtuozzo.com> (raw)
In-Reply-To: <20181217150326.30933-1-anders.roxell@linaro.org>
On 12/17/18 6:03 PM, Anders Roxell wrote:
> 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.
>
> Suggested-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
> ---
Acked-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
> lib/Kconfig.ubsan | 14 +++++++++-----
> 1 file changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/lib/Kconfig.ubsan b/lib/Kconfig.ubsan
> index 98fa559ebd80..a2ae4a8e4fa6 100644
> --- a/lib/Kconfig.ubsan
> +++ b/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
>
next prev parent reply other threads:[~2019-01-11 19:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-17 15:03 Anders Roxell
2019-01-11 19:01 ` Andrey Ryabinin [this message]
2019-01-30 1:36 ` Andrew Morton
2019-01-30 17:12 ` Andrey Ryabinin
2019-01-30 21:30 ` Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8bc73bbf-6c12-7fd1-3253-676731bf5ae5@virtuozzo.com \
--to=aryabinin@virtuozzo.com \
--cc=akpm@linux-foundation.org \
--cc=anders.roxell@linaro.org \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®