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

From: Andy Shevchenko
Date: Mon Aug 24 2020 - 09:42:31 EST


On Mon, Aug 24, 2020 at 09:28:28AM -0400, Steven Rostedt wrote:
> 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.

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?

--
With Best Regards,
Andy Shevchenko