Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3104755pxk; Mon, 28 Sep 2020 08:28:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlwI25c/JmGBLYIEUvcU+O41dK8xhqdxJa/5EQtQl/xxT6OuMbbxtkhlYZgJLeQIX3Pc5L X-Received: by 2002:aa7:d35a:: with SMTP id m26mr2255449edr.183.1601306896538; Mon, 28 Sep 2020 08:28:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601306896; cv=none; d=google.com; s=arc-20160816; b=Ptv4KPa/QaeVdJKPzLY/tJ7rF3zFw8YyXVIVsuQM30jTcK0yAWGg+3llnOPVOUWgYH bCJF4MgYbBjnaIiFa7nWvaziBJ8kUIFPJPKdErFTC5qnD0GoqGoJTINbJ6vgqUmiwVrp aKiY88MbJFZuXRrDlQw1MBDrGACYWXwvWlZu7zXZPwiyi9LMbaYopNYts6tjzi3eWpA5 n0PGSXMZroRBxC2fmVILNx7qiYEU583mnNkUjCJb64Gxag79FfLq3e4liXWKTJIkRgdv Z10TdZATj0JI3KXjkbsoDDa2RfbNtpfzumaidukuo4gseU2UTuE6oAsCzhyZsCsd3xFy 98Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=S4NOswQvNT8xGDQB7W86Rij+JzI4RP287vHrfJbZni0=; b=C+S8xVu1bPmapMUeEmgxE9PvQPqNYJf8chZZXrnJE7661sx/9FdTwTduQWUgWxT5kw dl7fjwhQTxvw+P6cXcclVMT5DylqNlDvZmCUiWSh09wg1GCbFrkGwm+ZD/ZKj/FmzaFB v7k33E7IPZ1tY3AH4sHgkipXvVvKBrZFOQKL2UUkH2KCTmP8Pmyan1/qkrGPzYiuK/Kv pwskZnSJgBvL6m+ae1kDu/ylcvA6tfzc466APV727poNoypB6f521FLXOns1BsBtqdcS DlCTeyxefo8u2dgUCMsbiw5BdpANk56QZCG6n7OB+qkz6IamkUPDmUKUpUNkUx5JPLRi wIHQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a16si766210eje.544.2020.09.28.08.27.52; Mon, 28 Sep 2020 08:28:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726573AbgI1P0w (ORCPT + 99 others); Mon, 28 Sep 2020 11:26:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:55582 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726551AbgI1P0w (ORCPT ); Mon, 28 Sep 2020 11:26:52 -0400 Received: from oasis.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E0A682100A; Mon, 28 Sep 2020 15:26:48 +0000 (UTC) Date: Mon, 28 Sep 2020 11:26:46 -0400 From: Steven Rostedt To: Masahiro Yamada Cc: Nicolas Boichat , groeck@chromium.org, dianders@chromium.org, Andrew Morton , Andy Shevchenko , "Guilherme G. Piccoli" , Kars Mulder , Kees Cook , Michal Marek , Rafael Aquini , Thomas Gleixner , Will Deacon , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v6] kernel/trace: Add DISALLOW_TRACE_PRINTK make option Message-ID: <20200928112646.4968999c@oasis.local.home> In-Reply-To: <20200928152840.v6.1.I4feb11d34ce7a0dd5ee2c3327fb5a1a9a646be30@changeid> References: <20200928152840.v6.1.I4feb11d34ce7a0dd5ee2c3327fb5a1a9a646be30@changeid> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 28 Sep 2020 15:29:29 +0800 Nicolas Boichat wrote: > trace_printk is meant as a debugging tool, and should not be > compiled into production code without specific debug Kconfig > options enabled, or source code changes, as indicated by the > warning that shows up on boot if any trace_printk is called: > ** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE ** > ** ** > ** trace_printk() being used. Allocating extra memory. ** > ** ** > ** This means that this is a DEBUG kernel and it is ** > ** unsafe for production use. ** > > If DISALLOW_TRACE_PRINTK=1 is passed on the make command > line, the kernel will generate a build-time error if > trace_printk is used. We expect distributors to set this > option for their production kernels. > > Note that the code to handle trace_printk is still present, > so this does not prevent people from compiling out-of-tree > kernel modules, or BPF programs. > > Also, we are not making this a kernel config option as we > want the developer convenience of being able to reuse a > production kernel config, add trace_printk for debugging, > and rebuild, without any config changes. > > Signed-off-by: Nicolas Boichat Masahiro, Are you OK with this change? If so can I have your Ack? -- Steve