Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6245884yba; Thu, 11 Apr 2019 15:27:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqxX7tcsoClj6EIL0O2Tm27cDhH9jS6P/45baFZuyquKz14tCKvpzzHNp8P5Nr+BawWilqAZ X-Received: by 2002:a17:902:110c:: with SMTP id d12mr26345407pla.47.1555021644954; Thu, 11 Apr 2019 15:27:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555021644; cv=none; d=google.com; s=arc-20160816; b=PqEjfrm5kEq64V33gkbIUR+y10LefEkvIgqvJnG0FqjelVdngVXA0xVF3OaQXbEjKJ Hy0Yky4UdSYN/Emkpp8x9AU0g28kf7JP2I/nJmnP2WIbiaes5MNFE+egS8KTYyTLenGg foqoOB/iCEMG6IFCtjpEIupUKADeEibg0re+OX9gfoJJX4H85a4bz0Gs00XTeMLexrl9 IbZwux/ZJJ34rHRcq528tKwOtxBkFGKBxv4lrbAykfr0beBFqlML9JshTPUN/c1Jrw8E 5uqaXAWGqClRVPqqEYlciUULBQgjHl30lif39gQotfyprBa/ndj8zQzQAjKKREwZBp2u tHig== 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=UoLLVcygV1LfDNeTQawdNC4kbLBy8PL1K4CMsysgYOI=; b=OmTH8GMKEzKyCjr+4XnzZU0QgBVFrn45xIziehKr/dYYq+tTOwlpdAoEZ0UB5BiiRN 8s8Zpy7YHQcW4AgT0mHbfiyRpVmdv8KVZGx5nq/U5volBTcCEhZHsZBIg8WO+8Ocb7gX hEOz5R7qfSX0HDwcS9dgBo8Pz24lG7amETxoZ6HUqukLV2x3UdTTMFHBJXUbU5lDhVEB +hEIuf9vX3/Xjl4zcoZl1KpcWjz+zWMbrrEWt+6DFGAYn9PB30/qlUC05FCLEAR1x7/X rtL+8tyWvMGz+FcFETqAFAUUf0PstKk87z4aT8SvneIH52beNEfg4FM7JVJr/D3FEuky Jl3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=O8QifJmK; 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 v20si35244714pgn.105.2019.04.11.15.27.08; Thu, 11 Apr 2019 15:27:24 -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=O8QifJmK; 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 S1727082AbfDKW00 (ORCPT + 99 others); Thu, 11 Apr 2019 18:26:26 -0400 Received: from mail-vk1-f196.google.com ([209.85.221.196]:33495 "EHLO mail-vk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726629AbfDKW00 (ORCPT ); Thu, 11 Apr 2019 18:26:26 -0400 Received: by mail-vk1-f196.google.com with SMTP id x194so1750724vke.0 for ; Thu, 11 Apr 2019 15:26:25 -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=UoLLVcygV1LfDNeTQawdNC4kbLBy8PL1K4CMsysgYOI=; b=O8QifJmKkEaCqV0Lg7upTka7UzOg3j4RKHYARveM3TStNChlnUbLNvHZD9Q99/dmFQ IH4mILno+UkON4pq+BiHlJH6FQHtK78mj7okhJdz7MnMgVvgHJ6z5X8ituV/3Kacwg7/ yh62X6ITMYlQMZYqvJNAKgyiO5B/DQKPZQ6sg= 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=UoLLVcygV1LfDNeTQawdNC4kbLBy8PL1K4CMsysgYOI=; b=FK9r98ID/gxD5pIlZgvyGztLGeTBotpoGb/9aInpEeBjJD+Vo1CtKwZk3QXdREIosf hJQwlDLbiKWbtCLag7j3ROImA+5iO/dHMcV1+dWgfKJrvIey/eEsgcTsnwsb8UrSwqoI 4ZKjmtQbDt7QCpyvO6DN45eRz5vgcNlFhcaImZAJJ7/FtQTuKktgEHX239btvauNRjG4 kAgNvhtCW0aW2V1FIAu7r6fU8p3ZibODqtB7fGBXNWzEVfx6nOx+y8LDpiLMg0TqZdcL rSgpS2Yb4I4okltxnmbqb6l4ESyFnncX3zFPDeOUNd9UT6o2G/gQgQT7T3czutNPqh7w d35w== X-Gm-Message-State: APjAAAXTnZCKOo2q/Utuo/uz9UipH/m1BMo+I5ovKg10JmuChFVmuXHG XOVDftnegvHmHm6e3sHzshg42CE62Jw= X-Received: by 2002:a1f:1284:: with SMTP id 126mr29196109vks.72.1555021584782; Thu, 11 Apr 2019 15:26:24 -0700 (PDT) Received: from mail-vs1-f50.google.com (mail-vs1-f50.google.com. [209.85.217.50]) by smtp.gmail.com with ESMTPSA id m23sm59598606vsl.24.2019.04.11.15.26.24 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Apr 2019 15:26:24 -0700 (PDT) Received: by mail-vs1-f50.google.com with SMTP id f22so4432101vso.7 for ; Thu, 11 Apr 2019 15:26:24 -0700 (PDT) X-Received: by 2002:a67:7816:: with SMTP id t22mr28491004vsc.115.1555021281313; Thu, 11 Apr 2019 15:21:21 -0700 (PDT) MIME-Version: 1.0 References: <20190410224213.20651-1-okaya@kernel.org> <135E84E9-F068-44CB-B4F6-A5AC2F4CDE3D@joshtriplett.org> <20190411221645.GA8692@localhost> In-Reply-To: <20190411221645.GA8692@localhost> From: Kees Cook Date: Thu, 11 Apr 2019 15:21:09 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] init: Do not select DEBUG_KERNEL by default To: Josh Triplett Cc: Sinan Kaya , Kees Cook , LKML , Masahiro Yamada , Andrew Morton , "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 , 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 Thu, Apr 11, 2019 at 3:16 PM Josh Triplett wrote: > > On Wed, Apr 10, 2019 at 11:13:52PM -0400, Sinan Kaya wrote: > > On 4/10/2019 11:02 PM, Josh Triplett wrote: > > > Then let's fix*that*, and get checkpatch to help enforce it in the future. EXPERT doesn't affect code generation, and neither should this. > > > > I think we have to do both. We need to go after the users as well as > > solve the immediate problem per this patch. > > > > As Mathieu identified, CONFIG_DEBUG_KERNEL is being used all over the > > place and getting subsystem owners to remove let alone add a check > > to checkpatch is just going to take time. > > > > Please let us know if you are OK with this plan. > > I'm not OK with this plan. Turning on EXPERT should make the options > under DEBUG_KERNEL visible; it's a bug that DEBUG_KERNEL affects code > generation as well. > > 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". > > Does that sound like an appropriately rapid solution for this bug? Sure, that sounds fine to me. Sinan can you take care of that for v4? -- Kees Cook