Re: [PATCH v2] init: Do not select DEBUG_KERNEL by default

Kees Cook
2019-04-10T23:24:34Z

On Wed, Apr 10, 2019 at 4:22 PM Josh Triplett <josh@joshtriplett.org> wrote:
>
> On April 10, 2019 3:58:55 PM PDT, Kees Cook <keescook@chromium.org> wrote:
> >On Wed, Apr 10, 2019 at 3:42 PM Sinan Kaya <okaya@kernel.org> wrote:
> >>
> >> We can't seem to have a kernel with CONFIG_EXPERT set but
> >> CONFIG_DEBUG_KERNEL unset these days.
> >>
> >> While some of the features under the CONFIG_EXPERT require
> >> CONFIG_DEBUG_KERNEL, it doesn't apply for all features.
> >>
> >> It looks like CONFIG_KALLSYMS_ALL is the only feature that
> >> requires CONFIG_DEBUG_KERNEL.
> >>
> >> Select CONFIG_EXPERT when CONFIG_DEBUG is chosen but you can
> >
> >Typo: CONFIG_DEBUG_KERNEL
> >
> >> still choose CONFIG_EXPERT without CONFIG_DEBUG.
> >
> >same.
> >
> >>
> >> Signed-off-by: Sinan Kaya <okaya@kernel.org>
> >
> >But with those fixed, looks good to me. Adding Josh (and others) to CC
> >since he originally added the linkage to EXPERT in commit
> >f505c553dbe2.
>
> CONFIG_DEBUG_KERNEL shouldn't affect code generation in any way; it should only make more options appear in kconfig. I originally added this to ensure that features you might want to *disable* aren't hidden, as part of the tinification effort.
>
> What specific problem does having CONFIG_DEBUG_KERNEL enabled cause for you? I'd still prefer to have a single switch for "don't hide things I might want to disable", rather than several.

See earlier in the thread: code generation depends on
CONFIG_DEBUG_KERNEL now unfortunately.

--
Kees Cook