[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201004071045.GB1650@Ryzen-9-3900X.localdomain>
Date: Sun, 4 Oct 2020 00:10:45 -0700
From: Nathan Chancellor <natechancellor@...il.com>
To: Kees Cook <keescook@...omium.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Ard Biesheuvel <ardb@...nel.org>,
Arnd Bergmann <arnd@...db.de>,
Masahiro Yamada <masahiroy@...nel.org>,
Michal Marek <michal.lkml@...kovi.net>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Marco Elver <elver@...gle.com>,
Randy Dunlap <rdunlap@...radead.org>,
Dmitry Vyukov <dvyukov@...gle.com>,
George Popescu <georgepope@...roid.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
Peter Oberparleiter <oberpar@...ux.ibm.com>,
Andrey Ryabinin <aryabinin@...tuozzo.com>,
clang-built-linux@...glegroups.com, linux-kbuild@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/4] ubsan: Disable object-size sanitizer under GCC
On Fri, Oct 02, 2020 at 03:15:25PM -0700, Kees Cook wrote:
> GCC's -fsanitize=object-size (as part of CONFIG_UBSAN_MISC) greatly
> increases stack utilization. Do not allow this under GCC.
>
> Suggested-by: Linus Torvalds <torvalds@...ux-foundation.org>
> Signed-off-by: Kees Cook <keescook@...omium.org>
> Link: https://lore.kernel.org/lkml/CAHk-=wjPasyJrDuwDnpHJS2TuQfExwe=px-SzLeN8GFMAQJPmQ@mail.gmail.com/
Reviewed-by: Nathan Chancellor <natechancellor@...il.com>
> ---
> lib/Kconfig.ubsan | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/lib/Kconfig.ubsan b/lib/Kconfig.ubsan
> index c0b801871e0b..aeb2cdea0b94 100644
> --- a/lib/Kconfig.ubsan
> +++ b/lib/Kconfig.ubsan
> @@ -104,6 +104,9 @@ config UBSAN_UNSIGNED_OVERFLOW
>
> config UBSAN_OBJECT_SIZE
> def_bool UBSAN_MISC
> + # gcc hugely expands stack usage with -fsanitize=object-size
> + # https://lore.kernel.org/lkml/CAHk-=wjPasyJrDuwDnpHJS2TuQfExwe=px-SzLeN8GFMAQJPmQ@mail.gmail.com/
> + depends on !CC_IS_GCC
> depends on $(cc-option,-fsanitize=object-size)
>
> config UBSAN_BOOL
> --
> 2.25.1
Powered by blists - more mailing lists