Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5292572yba; Wed, 10 Apr 2019 16:08:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqzgm4rmY0UEBdh5qmN0Lxf+M/6U3kMA4+rCCOM/7zwt3IDoVVQLF6XJo5op58Ht5OnAFFQ2 X-Received: by 2002:a62:292:: with SMTP id 140mr46774999pfc.206.1554937731130; Wed, 10 Apr 2019 16:08:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554937731; cv=none; d=google.com; s=arc-20160816; b=Gu3bJNfrJjwDtKBunV3aRwkRLdmLr/Knc8qtKbpx0OgjoDeGn/nWtlUVc6WDRAySeS llbK65N8/k2NIHMpi/j3TAQS7ysSjbTp7SPUSEcmwPLorLuMbtuJ7NFZ9MO+CnSkqspk u0f7T367KgYWg3tHObhyxfHjjFeJJl2Ke0aUu7HAvjdPI8OSc7DvbLoYYOhCkfo1duT5 cbtPeK7+iRIqQN7GqAqY2SiVEsrbDcNlmm7ybBytmu+TMjAZjXWU3asmY/JDSrkOtV/B qxEIIvkhEe1Mwf59MbRzHXGypejYSMQmP4/n3q4M7uDby+evhNs3lDsrGqBzmZAg5qI8 gdtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=GCdGa8XvaK3xVTLbpAEbLjShSDf4SFcVmWdHub698F4=; b=NLraaax+vNrjVicWLMR8jm7EWlXyzCJ+5h2IkDTe8g0oFfTDVknFjnwaDnGjRWvcz3 oD2M3KCaeRlIqXFu5flYKagEkobUZD4ry4hbcWvos6WfKQSPZCNlKG6HlidYem36PbYt QfWPoJxvjttnFpgKshJMZASvvP9XwKC50NB6W8bXwMnYWKutPqzshz4X2zhmt8RAC7dM eM/kjTJQ1oCsylQrnoYUofOSy23Tu/bpGTCTGbCzblH0iWF/BUYbOEvbraXVdYhEYHwH 6XQHJiSPm5OCZ7BygMxRdrqufz9aQwtajnC/PYu2yzIUy15fhAoWpB0cOQ9b8iVfKWjT Zbcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=I2sCm8+w; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z13si32199182pgp.376.2019.04.10.16.08.35; Wed, 10 Apr 2019 16:08:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=I2sCm8+w; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726732AbfDJXHU (ORCPT + 99 others); Wed, 10 Apr 2019 19:07:20 -0400 Received: from mail-vs1-f68.google.com ([209.85.217.68]:40849 "EHLO mail-vs1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726023AbfDJXHU (ORCPT ); Wed, 10 Apr 2019 19:07:20 -0400 Received: by mail-vs1-f68.google.com with SMTP id f22so2367991vso.7 for ; Wed, 10 Apr 2019 16:07:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GCdGa8XvaK3xVTLbpAEbLjShSDf4SFcVmWdHub698F4=; b=I2sCm8+wdIemlxNR36Aq3DRXhcx8Hnbjfs0MFEKfZatcsYJJLdAhpYT3f5RxLE2u4I NhgX0nrtENwmsLJeQr2pmQX/UzGBTkIFE5Ov4+gI5D3WQlhvw0uzoUu9KDgdT1wISvPg z6oEIA40MeAqUK7gkNcGt7vAKgf74VVDtEzDc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GCdGa8XvaK3xVTLbpAEbLjShSDf4SFcVmWdHub698F4=; b=j6X5buOss8XkT6zUyWcKzAwm5r3vBP2JhaJVqwewDTyKiX/w19As1fuDppwwR1m2gH dgUcWLlrAyGJTaTtN1/dCJyeKtJxk6NB1e78xa3zAoh8oh4kLuAgmhNo5stUnjlq4RXt nBPka9jRGxIbqOwy4zWxH3oY6Sj/JQA5tBBl6M5HCDucENn4sy3hl3/QNG+GSJ/+V4DW ZtAWNo0KtAFfKoXNNTz+YNAlLeUFesXhIrkXNf0OJYL+g5RiOctJ2PO0gpwLU5jdLXng 4Px36Eux5MfrWiWi4RUl6GcxRro1SFrv1oBwnL9dKrcglS9EzKUfq4b0gm8oewfetgFl S5ew== X-Gm-Message-State: APjAAAWS01v7AluM/6Gw4rl9yrkT2m+7Z2m93nJLqOP7iuyV+cTT98zj NBWMdquHSOe1fnCialXq6DKkFmJ6fJg= X-Received: by 2002:a67:ea53:: with SMTP id r19mr27661839vso.12.1554937638944; Wed, 10 Apr 2019 16:07:18 -0700 (PDT) Received: from mail-ua1-f42.google.com (mail-ua1-f42.google.com. [209.85.222.42]) by smtp.gmail.com with ESMTPSA id b197sm44217354vkd.9.2019.04.10.16.07.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Apr 2019 16:07:18 -0700 (PDT) Received: by mail-ua1-f42.google.com with SMTP id g8so1393846uaj.0 for ; Wed, 10 Apr 2019 16:07:18 -0700 (PDT) X-Received: by 2002:ab0:2f8:: with SMTP id 111mr24868511uah.123.1554937147076; Wed, 10 Apr 2019 15:59:07 -0700 (PDT) MIME-Version: 1.0 References: <20190410224213.20651-1-okaya@kernel.org> In-Reply-To: <20190410224213.20651-1-okaya@kernel.org> From: Kees Cook Date: Wed, 10 Apr 2019 15:58:55 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] init: Do not select DEBUG_KERNEL by default To: Sinan Kaya Cc: LKML , Masahiro Yamada , Andrew Morton , Kees Cook , "Peter Zijlstra (Intel)" , Johannes Weiner , Nicholas Piggin , Mathieu Desnoyers , Vasily Gorbik , Adrian Reber , Richard Guy Briggs , Petr Mladek , Andy Shevchenko , Matthew Wilcox , Joe Lawrence , Randy Dunlap , Mikulas Patocka , Robin Murphy , Tetsuo Handa , Changbin Du , Josh Triplett , Frederic Weisbecker , Sam Ravnborg , Ingo Molnar Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 10, 2019 at 3:42 PM Sinan Kaya 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 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. Reviewed-by: Kees Cook -Kees > --- > init/Kconfig | 2 -- > lib/Kconfig.debug | 1 + > 2 files changed, 1 insertion(+), 2 deletions(-) > > diff --git a/init/Kconfig b/init/Kconfig > index 4592bf7997c0..37e10a8391a3 100644 > --- a/init/Kconfig > +++ b/init/Kconfig > @@ -1206,8 +1206,6 @@ config BPF > > menuconfig EXPERT > bool "Configure standard kernel features (expert users)" > - # Unhide debug options, to make the on-by-default options visible > - select DEBUG_KERNEL > help > This option allows certain base kernel options and settings > to be disabled or tweaked. This is for specialized > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > index 0d9e81779e37..9fbf3499ec8d 100644 > --- a/lib/Kconfig.debug > +++ b/lib/Kconfig.debug > @@ -434,6 +434,7 @@ config MAGIC_SYSRQ_SERIAL > > config DEBUG_KERNEL > bool "Kernel debugging" > + default EXPERT > help > Say Y here if you are developing drivers or trying to debug and > identify kernel problems. > -- > 2.21.0 > -- Kees Cook