From: Steven Rostedt <rostedt@goodmis.org>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: Nicolas Boichat <drinkcat@chromium.org>,
groeck@chromium.org, dianders@chromium.org,
Andrew Morton <akpm@linux-foundation.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
"Guilherme G. Piccoli" <gpiccoli@canonical.com>,
Kars Mulder <kerneldev@karsmulder.nl>,
Kees Cook <keescook@chromium.org>,
Michal Marek <michal.lkml@markovi.net>,
Rafael Aquini <aquini@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
Will Deacon <will@kernel.org>,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6] kernel/trace: Add DISALLOW_TRACE_PRINTK make option
Date: Mon, 28 Sep 2020 11:26:46 -0400 [thread overview]
Message-ID: <20200928112646.4968999c@oasis.local.home> (raw)
In-Reply-To: <20200928152840.v6.1.I4feb11d34ce7a0dd5ee2c3327fb5a1a9a646be30@changeid>
On Mon, 28 Sep 2020 15:29:29 +0800
Nicolas Boichat <drinkcat@chromium.org> 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 <drinkcat@chromium.org>
Masahiro,
Are you OK with this change? If so can I have your Ack?
-- Steve
prev parent reply other threads:[~2020-09-28 15:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-28 7:29 [PATCH v6] kernel/trace: Add DISALLOW_TRACE_PRINTK make option Nicolas Boichat
2020-09-28 15:26 ` Steven Rostedt [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200928112646.4968999c@oasis.local.home \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=aquini@redhat.com \
--cc=dianders@chromium.org \
--cc=drinkcat@chromium.org \
--cc=gpiccoli@canonical.com \
--cc=groeck@chromium.org \
--cc=keescook@chromium.org \
--cc=kerneldev@karsmulder.nl \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=michal.lkml@markovi.net \
--cc=tglx@linutronix.de \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox