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

From: Steven Rostedt
Date: Mon Aug 24 2020 - 09:28:37 EST


On Mon, 24 Aug 2020 08:26:13 +0000
David Laight <David.Laight@xxxxxxxxxx> wrote:

> Since the objective seems to be to ensure there are no
> calls to trace_printk() in the git tree, but to allow
> them in uncommitted sources. Why not use a config option
> and rely on rand-config builds to detect any 'accidental'
> commits?

Because we don't want distros to ship with disallowing trace_printk,
where someone finds a bug, sends the config to a developer, who then
adds trace_printk() just to find that they can't use it.

The point of avoiding a config was to keep the burden of having the
developer needing it and having to then modify the config given to them.

Also, it would then prevent those developing modules from using
trace_printk() in their module if they build against one of these
kernels.

Finally, there's debug code in the kernel that legitimately uses
trace_printk(), and those randconfigs will trigger on them.

-- Steve