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

From: Josh Triplett
Date: Thu Apr 11 2019 - 18:18:59 EST


On Thu, Apr 11, 2019 at 10:00:24AM -0700, Kees Cook wrote:
> On Wed, Apr 10, 2019 at 10:34 PM Masahiro Yamada
> <yamada.masahiro@xxxxxxxxxxxxx> wrote:
> >
> > On Thu, Apr 11, 2019 at 11:47 AM Kees Cook <keescook@xxxxxxxxxxxx> wrote:
> > >
> > > On Wed, Apr 10, 2019 at 5:56 PM Sinan Kaya <okaya@xxxxxxxxxx> 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_KERNEL is chosen but
> > > > you can still choose CONFIG_EXPERT without CONFIG_DEBUG_KERNEL.
> > > >
> > > > Signed-off-by: Sinan Kaya <okaya@xxxxxxxxxx>
> > > > Reviewed-by: Kees Cook <keescook@xxxxxxxxxxxx>
> > >
> > > Masahiro, should this go via your tree, or somewhere else?
> >
> >
> > I think somewhere else.
>
> Okay. Andrew, can you take this?

Echoing my comment from the previous thread: this does not seem like the
right solution to me and it introduces a new problem. Please see my
response to v2 for a quick alternative that would address the underlying
bug, which is that some code generation depends on DEBUG_KERNEL.