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

2020-08-25 Thread Steven Rostedt
On Tue, 25 Aug 2020 08:38:27 +0800 Nicolas Boichat wrote: > This already works. I'll be honest, I'm not 100% sure why (and if > fully intentional)... > > The CFLAGS end up in 3 generated assembly files: > # grep -R DISALLOW_TRACE_PRINTK * | grep -v ".cmd:" > arch/x86/kernel/asm-offsets.s:#

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

2020-08-24 Thread Nicolas Boichat
On Mon, Aug 24, 2020 at 9:30 PM Steven Rostedt wrote: > > On Mon, 24 Aug 2020 10:59:13 +0800 > Nicolas Boichat wrote: > > > --- > > > > +ifeq ($(KBUILD_DISALLOW_TRACE_PRINTK),1) > > +KBUILD_CFLAGS += -DDISALLOW_TRACE_PRINTK > > +endif > > + > > KBUILD_CFLAGS += $(DEBUG_CFLAGS) > > export

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

2020-08-24 Thread Steven Rostedt
On Mon, 24 Aug 2020 16:42:01 +0300 Andy Shevchenko 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

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

2020-08-24 Thread Andy Shevchenko
On Mon, Aug 24, 2020 at 09:28:28AM -0400, Steven Rostedt wrote: > On Mon, 24 Aug 2020 08:26:13 + > David Laight 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

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

2020-08-24 Thread Steven Rostedt
On Mon, 24 Aug 2020 10:59:13 +0800 Nicolas Boichat wrote: > --- > > Changes since v4: > - Turns this into a make option, instead of a config >option, as suggested by Steven Rostedt . > > Changes since v2/v3: > - Rebase only, v3 didn't exist as I just split out the other >necessary

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

2020-08-24 Thread Steven Rostedt
On Mon, 24 Aug 2020 08:26:13 + David Laight 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' >

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

2020-08-24 Thread David Laight
From: Nicolas Boichat > Sent: 24 August 2020 03:59 > > 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

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

2020-08-23 Thread Nicolas Boichat
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