[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <f6fcae8a-9b50-48e4-84e9-c37613226c63@app.fastmail.com>
Date: Thu, 01 Jun 2023 19:50:38 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "Kees Cook" <keescook@...omium.org>,
"Arnd Bergmann" <arnd@...nel.org>
Cc: kasan-dev@...glegroups.com,
"Andrey Ryabinin" <ryabinin.a.a@...il.com>,
"Alexander Potapenko" <glider@...gle.com>,
"Andrey Konovalov" <andreyknvl@...il.com>,
"Dmitry Vyukov" <dvyukov@...gle.com>,
"Vincenzo Frascino" <vincenzo.frascino@....com>,
"Marco Elver" <elver@...gle.com>, linux-media@...r.kernel.org,
linux-crypto@...r.kernel.org,
"Herbert Xu" <herbert@...dor.apana.org.au>,
"Ard Biesheuvel" <ardb@...nel.org>,
"Mauro Carvalho Chehab" <mchehab@...nel.org>,
"Dan Carpenter" <dan.carpenter@...aro.org>,
"Matthias Brugger" <matthias.bgg@...il.com>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@...labora.com>,
"Nathan Chancellor" <nathan@...nel.org>,
"Nick Desaulniers" <ndesaulniers@...gle.com>,
"Tom Rix" <trix@...hat.com>,
"Josh Poimboeuf" <jpoimboe@...nel.org>,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, llvm@...ts.linux.dev
Subject: Re: [PATCH] [RFC] ubsan: disallow bounds checking with gcov on broken gcc
On Thu, Jun 1, 2023, at 18:14, Kees Cook wrote:
> On Thu, Jun 01, 2023 at 05:18:11PM +0200, Arnd Bergmann wrote:
>
> I think more production systems will have CONFIG_UBSAN_BOUNDS enabled
> (e.g. Ubuntu has had it enabled for more than a year now) than GCOV,
> so I'd prefer we maintain all*config coverage for the more commonly
> used config.
Fair enough, I can send that as v2, but let's see what the others
think first.
>> config CC_HAS_UBSAN_BOUNDS_STRICT
>> def_bool $(cc-option,-fsanitize=bounds-strict)
>> + # work around https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110074
>> + depends on GCC_VERSION > 140000 || !GCOV_PROFILE_ALL
>> help
>> The -fsanitize=bounds-strict option is only available on GCC,
>> but uses the more strict handling of arrays that includes knowledge
>
> Alternatively, how about falling back to -fsanitize=bounds instead, as
> that (which has less coverage) wasn't triggering the stack frame
> warnings?
>
> i.e. fall back through these:
> -fsanitize=array-bounds (Clang)
> -fsanitize=bounds-strict (!GCOV || bug fixed in GCC)
> -fsanitize=bounds
>From what I can tell, -fsanitize=bounds has the same problem
as -fsanitize=bounds-strict, so that would not help.
Arnd
Powered by blists - more mailing lists