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
| ||
|
Date: Wed, 10 Apr 2019 15:21:15 -0700 From: Kees Cook <keescook@...omium.org> To: Sinan Kaya <Okaya@...nel.org> Cc: LKML <linux-kernel@...r.kernel.org>, Masahiro Yamada <yamada.masahiro@...ionext.com>, Andrew Morton <akpm@...ux-foundation.org>, Johannes Weiner <hannes@...xchg.org>, "Peter Zijlstra (Intel)" <peterz@...radead.org>, Nicholas Piggin <npiggin@...il.com>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>, Vasily Gorbik <gor@...ux.ibm.com>, Adrian Reber <adrian@...as.de>, Richard Guy Briggs <rgb@...hat.com> Subject: Re: [PATCH v1] init: Do not select DEBUG_KERNEL by default On Wed, Apr 10, 2019 at 3:18 PM Sinan Kaya <Okaya@...nel.org> wrote: > > On 4/10/2019 6:04 PM, Kees Cook wrote: > > >> I don't want any of the debug features in my kernel but still > >> need all the expert features. My kernel is considered a production > >> kernel. I don't really want to ship all the good debug enables. > > > > Production kernels enable it. e.g. Ubuntu: > > $ grep '\bCONFIG_DEBUG_KERNEL\b' /boot/config-$(uname -r) > > CONFIG_DEBUG_KERNEL=y > > > > It makes sense for a general purpose operating system. It doesn't apply > to my limited case where I'm very concerned about image size. Gotcha. > > >> I don't see the relationship between CONFIG_DEBUG and CONFIG_EXPERT > >> as none of the features except KALLSYMS depend on it. If there was > >> a compile time dependency, I'd say move it to the things that need > >> it as this patch suggests. > > > > CONFIG_DEBUG_KERNEL mainly only enables the visibility of various > > other options. I can only find two instances of it controlling a > > "default", and one is overridden by CONFIG_SMP on alpha. :) > > > > $ git grep -B2 'default.*DEBUG_KERNEL' > > arch/alpha/Kconfig.debug-config MATHEMU > > arch/alpha/Kconfig.debug- tristate "Kernel FP software > > completion" if DEBUG_KERNEL && !SMP > > arch/alpha/Kconfig.debug: default y if !DEBUG_KERNEL || SMP > > -- > > kernel/trace/Kconfig-menuconfig FTRACE > > kernel/trace/Kconfig- bool "Tracers" > > kernel/trace/Kconfig: default y if DEBUG_KERNEL > > If the idea is to just show, nothing should happen based on > DEBUG_KERNEL, right? > > No default selection as in FTRACE, no c/S file changes in the code > path as Mathieu identified. Yeah, this is clearly a problem. I hadn't looked for code #ifdefs :( > I can go after individual enables if you agree assuming Mathieu will > go after the changes in the other email. Let me know otherwise. How about you split it, but make DEBUG_KERNEL be "default EXPERT" that way enabling EXPERT will enable DEBUG_KERNEL still in the default case? -- Kees Cook
Powered by blists - more mailing lists