Re: [PATCH v5] kernel/trace: Add DISALLOW_TRACE_PRINTK make option

From: Steven Rostedt
Date: Mon Aug 24 2020 - 14:26:41 EST


On Mon, 24 Aug 2020 16:42:01 +0300
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:

> How making it make's option prevent some "smart" distros to achieve the same?
> AFAIU any compile-time knob will allow to build a kernel w/o a feature and you
> are against of such kernel builds in distros. Catch-22?

Because it will fail the build if it finds a trace_printk() in the
compiled code, but doesn't touch the config that is shipped, nor does
it affect modules being built against this kernel.

This patch series is for those that do not want a trace_printk()
accidentally left behind in their own work and trigger that big warning
and scare their users. But it still gives an option for developers to
add a trace_printk.

That is, the decision to have trace_printk in a particular output
(vmlinux) is done at the compile time, and all it does is to make sure
one isn't present at that moment. This series is not about keeping them
out completely (test modules, etc), which a config option will.

-- Steve