lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a0UXcQKgoGYT0gVQynZLpL-ozK6EtA0Q4CaiGYDmxf8ZA@mail.gmail.com>
Date:   Thu, 21 Feb 2019 16:19:47 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Andrey Ryabinin <aryabinin@...tuozzo.com>
Cc:     Andrey Konovalov <andreyknvl@...gle.com>,
        Masahiro Yamada <yamada.masahiro@...ionext.com>,
        Michal Marek <michal.lkml@...kovi.net>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Mark Brown <broonie@...nel.org>, Qian Cai <cai@....pw>,
        Alexander Potapenko <glider@...gle.com>,
        Martin Schwidefsky <schwidefsky@...ibm.com>,
        Christoph Lameter <cl@...ux.com>,
        LKML <linux-kernel@...r.kernel.org>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        kasan-dev <kasan-dev@...glegroups.com>
Subject: Re: [PATCH] kasan: turn off asan-stack for clang-8 and earlier

On Thu, Feb 21, 2019 at 11:06 AM Andrey Ryabinin
<aryabinin@...tuozzo.com> wrote:
> On 2/20/19 8:35 PM, Arnd Bergmann wrote:
> > On Wed, Feb 20, 2019 at 6:00 PM Andrey Ryabinin <aryabinin@...tuozzo.com> wrote:
> >> On 2/20/19 5:51 PM, Arnd Bergmann wrote:

> > Maybe bringing it back would be a compromise? That way it's hidden from
> > all the build testing bots (because of the !CONFIG_COMPILE_TEST dependency),
> > but anyone who really wants it can still have the option, and set
> > CONFIG_FRAME_WARN
> > to whichever value they like.
> >
>
>
> I think there is much simpler solution:
>
> ---
>  lib/Kconfig.kasan | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/lib/Kconfig.kasan b/lib/Kconfig.kasan
> index 219cddc913ac..6cd035f06cee 100644
> --- a/lib/Kconfig.kasan
> +++ b/lib/Kconfig.kasan
> @@ -105,6 +105,8 @@ endchoice
>
>  config KASAN_STACK
>         int
> +       range 0 1
> +       prompt "Enable stack instrumentation (unsafe)" if CC_IS_CLANG && (CLANG_VERSION < 90000)
>         default 0 if CC_IS_CLANG && (CLANG_VERSION < 90000)
>         default 1
>         help
> --
>
>
> AFAIK, randconfig is not able to randomize int config options, so it will be disabled for build robots,
> but users still will be able to enable it.

Right, this will work, but I find it a bit awkward to require users to
enter 0 or 1.

My assumption is that build bots turn on CONFIG_COMPILE_TEST, so
having a bool option that depends on COMPILE_TEST would be more
conventional. We can debate whether it should also depend on
CONFIG_EXPERT or not. Something like

config KASAN_STACK
         bool "Enable stack instrumentation (unsafe)" if CC_IS_CLANG
&& !COMPILE_TEST
         default CC_IS_GCC || (CLANG_VERSION >= 90000)

And then a simpler Makefile logic (could also be done in Kconfig) to turn
that bool symbol into an integer argument for asan-stack=

       Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ