[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2370bfbc-762f-fb3f-79b1-483a095fdf7c@virtuozzo.com>
Date: Wed, 30 Jan 2019 20:12:45 +0300
From: Andrey Ryabinin <aryabinin@...tuozzo.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Anders Roxell <anders.roxell@...aro.org>, arnd@...db.de,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] lib/ubsan: default UBSAN_ALIGNMENT to not set
On 1/30/19 4:36 AM, Andrew Morton wrote:
> On Fri, 11 Jan 2019 22:01:16 +0300 Andrey Ryabinin <aryabinin@...tuozzo.com> wrote:
>
>>
>>
>> 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@...db.de>
>>> Signed-off-by: Anders Roxell <anders.roxell@...aro.org>
>>> ---
>>
>> Acked-by: Andrey Ryabinin <aryabinin@...tuozzo.com>
>>
>
> Confused. Why does allmodconfig result in UBSAN warnings?
>
UBSAN warnings is a result of enabling noisy CONFIG_UBSAN_ALIGNMENT which is disabled
by default if HAVE_EFFICIENT_UNALIGNED_ACCESS=y.
It's noisy even if don't have efficient unaligned access, e.g. people often add __cacheline_aligned_in_smp
in structs, but forget to align allocations of such struct (kmalloc() give 8-byte alignment in worst case).
Powered by blists - more mailing lists