Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1787554yba; Sun, 14 Apr 2019 20:57:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqyh5VIiwgKGaMNe8O2PnNrPfldCUi0CXn8arrZIDRGrg3PIh2NYmBV2/HYlHJQ1FBwzfF+Z X-Received: by 2002:a17:902:f08a:: with SMTP id go10mr70508731plb.121.1555300625062; Sun, 14 Apr 2019 20:57:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555300625; cv=none; d=google.com; s=arc-20160816; b=bQVZ/NpSxgDRc+ufxSWYcsswGPQdVovzaUEbXjszBYWbxwtEs/tslT4egBYJx+clOv 3Eghiimuc2H4h+nnMOWhbipiWP7MJRKm/bTB3kUlkHnhJbPM9Ce47eaDgAd+9EHFQWt3 Ze8T+lReGMPxPPnRKRSALq7UuAofv7avkXt6zb9LwoT+mqfo9j9XS516r7VXwsjsQ81h mEGxvtbAPTDelpyUsAEBhnbaLDbVxhDbLnG5zeUAfSgz5eMo+ohq0QB9e7Hn/CiWnc97 gwVZwKpDgxBWoWARTInSWbrTy+v18yH3tMfZRT6mSPWylG6WhZikpn8jyX3006Uk/3qL +YJw== 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=jyV5kTkay74pM8dbfwJjaag1cWzx8r525eT9xb4ekM8=; b=oXe+5DpftxZtcBX+13YqaZKseaGN1Rz0YMUVMAYl1q9XVMjxYQOVRKWEh/ivMRDtC7 edNoJV4jxKeYRWAW+mCLhgFTZvxjUtu8Ar0eigJW2TmrwSOC9L4eQPmLFjwt6+Yzn6l0 JTTtSh8L0llIVd7K3NfFO8XsORDzMWjpawV9CYmLTMQwq41fRAfSE3pycdNLWIBf+FlI v+PDhxyDcVGwTd+i8LS1tYGa1KWODqkObUByFAlD8963mIQupD8TQkvDSbUUh5I8Lrdd KdzYKgT8gfARL3m1C4cKXBl2vZTTzHPmeNpEzEjox7f/6FQEEtPG8NyaBdpDMqdgcBhQ WZeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=EoCTxM5L; 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 i9si33554772pgk.207.2019.04.14.20.56.48; Sun, 14 Apr 2019 20:57:05 -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=EoCTxM5L; 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 S1726308AbfDOD4J (ORCPT + 99 others); Sun, 14 Apr 2019 23:56:09 -0400 Received: from mail-ua1-f66.google.com ([209.85.222.66]:37635 "EHLO mail-ua1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725775AbfDOD4J (ORCPT ); Sun, 14 Apr 2019 23:56:09 -0400 Received: by mail-ua1-f66.google.com with SMTP id l17so5058167uar.4 for ; Sun, 14 Apr 2019 20:56:08 -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=jyV5kTkay74pM8dbfwJjaag1cWzx8r525eT9xb4ekM8=; b=EoCTxM5L0BsAdeu1wLMyWdiXYcURtphU6nH8o2Ez/Qukwh6N9aHi4+sNnazKGkfiHN Ra81/Vf2+GKGPSxaVmPN15g/f1M7FkCM+5PO5TESa3y0HKr6UWvCdNT3aPR8JPIH2tVH hDSy5XhmrLKx1iMsHLfviCkhAHO0PISyoo2HI= 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=jyV5kTkay74pM8dbfwJjaag1cWzx8r525eT9xb4ekM8=; b=c71UVZkwm6ADCiA6m20+QKqLvs+X3R7SXGJO3pSj0yYBW2r5bnxa8D8H2qkaTyhUX9 Whv2lpk/WfIYLdcU1nXsnPPuNopur7OxHNij2RAW/ZmxCpoM8pnYKPstGI/YqdZiv56F xung6LMgLysVyqm19kNkJbSvoAlvRVVHbYtUxLMwob5CV06rpBZBU9Stmy7ZF/lf8KoH mjc7/SqJ5dZK+utqzEENFXXczQJ2pQg4fjwVrCR4ajMrLA4p8eAwdQSMwkGFK2OrF5a7 Hzo+kUc1HyTGTb6Sg6fRdd4JolSzJPR7h9LggIkVosmtjBGstzOzBjRUOxqadndk2s10 TtXw== X-Gm-Message-State: APjAAAXyGAZFNbQjThiSXe9QTILZyjvNwz5YBILKo9EwXb6PWAfPixLu hU1Mo+9Z0lfqDakluRE/jO12LLu9xcI= X-Received: by 2002:ab0:7656:: with SMTP id s22mr36583548uaq.70.1555300567784; Sun, 14 Apr 2019 20:56:07 -0700 (PDT) Received: from mail-vs1-f46.google.com (mail-vs1-f46.google.com. [209.85.217.46]) by smtp.gmail.com with ESMTPSA id l9sm8316619uae.1.2019.04.14.20.56.06 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Apr 2019 20:56:07 -0700 (PDT) Received: by mail-vs1-f46.google.com with SMTP id g187so8662303vsc.8 for ; Sun, 14 Apr 2019 20:56:06 -0700 (PDT) X-Received: by 2002:a67:76c7:: with SMTP id r190mr8444700vsc.196.1555300566426; Sun, 14 Apr 2019 20:56:06 -0700 (PDT) MIME-Version: 1.0 References: <20190413224438.10802-1-okaya@kernel.org> In-Reply-To: <20190413224438.10802-1-okaya@kernel.org> From: Kees Cook Date: Sun, 14 Apr 2019 20:55:55 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5 0/5] init: Do not select DEBUG_KERNEL by default To: Sinan Kaya , Andrew Morton Cc: LKML , Josh Triplett 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 Sat, Apr 13, 2019 at 3:44 PM Sinan Kaya wrote: > > CONFIG_DEBUG_KERNEL has been designed to just enable Kconfig options. > Kernel code generatoin should not depend on CONFIG_DEBUG_KERNEL. > > Proposed alternative plan: let's add a new symbol, something like > DEBUG_MISC ("Miscellaneous debug code that should be under a more > specific debug option but isn't"), make it depend on DEBUG_KERNEL and be > "default DEBUG_KERNEL" but allow itself to be turned off, and then > mechanically change the small handful of "#ifdef CONFIG_DEBUG_KERNEL" to > "#ifdef CONFIG_DEBUG_MISC". Thanks! This looks good to me. For the series: Reviewed-by: Kees Cook Andrew, can you take these from lkml, or should the series get resent directly to you? I think you might be the best to carry this? Thanks! -Kees > > Diff from v4: > - collect reviewed-by > - collect acked-by > - fix nit on 1/5 > > Sinan Kaya (5): > init: Introduce DEBUG_MISC option > powerpc: Replace CONFIG_DEBUG_KERNEL with CONFIG_DEBUG_MISC > mips: Replace CONFIG_DEBUG_KERNEL with CONFIG_DEBUG_MISC > xtensa: Replace CONFIG_DEBUG_KERNEL with CONFIG_DEBUG_MISC > net: Replace CONFIG_DEBUG_KERNEL with CONFIG_DEBUG_MISC > > arch/mips/kernel/setup.c | 2 +- > arch/powerpc/kernel/sysfs.c | 8 ++++---- > arch/xtensa/include/asm/irqflags.h | 2 +- > arch/xtensa/kernel/smp.c | 2 +- > lib/Kconfig.debug | 9 +++++++++ > net/netfilter/core.c | 2 +- > 6 files changed, 17 insertions(+), 8 deletions(-) > > -- > 2.21.0 > -- Kees Cook