[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a3wOVdds2-qz365LoBNGtrx6ksCzCHp7T+qSev+R3ZRPQ@mail.gmail.com>
Date: Fri, 10 Dec 2021 10:40:12 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Kees Cook <keescook@...omium.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Arnd Bergmann <arnd@...db.de>,
Masahiro Yamada <masahiroy@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
Peter Zijlstra <peterz@...radead.org>,
Nathan Chancellor <nathan@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-hardening@...r.kernel.org
Subject: Re: [PATCH] Kconfig.debug: Make DEBUG_INFO selectable from a choice
On Fri, Dec 10, 2021 at 1:09 AM Kees Cook <keescook@...omium.org> wrote:
>
> Currently it's not possible to enable DEBUG_INFO for an all*config
> build, since it is marked as "depends on !COMPILE_TEST". This generally
> makes sense because a debug build of an all*config target ends up taking
> much longer and the output is much larger. Having this be "default off"
> makes sense. However, there are cases where enabling DEBUG_INFO for such
> builds is useful for doing treewide A/B comparisons of build options,
> etc.
>
> Make DEBUG_INFO selectable from any of the DWARF version choice options,
> with DEBUG_INFO_NONE being the default for COMPILE_TEST. The mutually
> exclusive relationship between DWARF5 and BTF must be inverted, but the
> result remains the same. Additionally moves DEBUG_KERNEL and DEBUG_MISC
> up to the top of the menu because was enabling features _above_ it,
> making it weird to navigate menuconfig.
>
> Suggested-by: Arnd Bergmann <arnd@...db.de>
> Signed-off-by: Kees Cook <keescook@...omium.org>
Looks good to me,
Reviewed-by: Arnd Bergmann <arnd@...db.de>
One detail:
> +choice
> + prompt "Debug information"
> + depends on DEBUG_KERNEL
> + default DEBUG_INFO_NONE if COMPILE_TEST
> + default DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT if DEBUG_KERNEL
I think this line should be simplified to
default DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT
since DEBUG_KERNEL is always enabled at this point. You can also consider
turning the 'menu' into 'menuconfig DEBUG_KERNEL' and dropping the 'depends
on DEBUG_KERNEL' in favor of the implied dependency.
Arnd
Powered by blists - more mailing lists