lkml.org 
[lkml]   [2020]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] kernel/trace: Add TRACING_ALLOW_PRINTK config option
On Thu, Jun 25, 2020 at 12:04 AM Steven Rostedt <rostedt@goodmis.org> wrote:
>
> On Wed, 24 Jun 2020 16:45:24 +0800
> Nicolas Boichat <drinkcat@chromium.org> wrote:
>
> > trace_printk is only meant as a debugging tool, and should never be
> > compiled into production code without 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 this option is set to n, the kernel will generate a build-time
> > error if trace_printk is used.
> >
> > Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
>
> Interesting. Note, this will prevent modules with trace_printk from
> being loaded as well.

Err, all of these changes are in macros (nothing gets built in the
kernel), so this will prevent modules with trace_printk from being
_built_.

Now, if you set the option to =y when building the module (separately,
even though the rest of the kernel has =n) then I don't see why the
module could not be loaded.

>
> -- Steve

\
 
 \ /
  Last update: 2020-06-25 03:33    [W:0.093 / U:0.916 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site