linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Boichat <drinkcat@chromium.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Douglas Anderson <dianders@chromium.org>,
	Guenter Roeck <groeck@chromium.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	"Guilherme G. Piccoli" <gpiccoli@canonical.com>,
	Kars Mulder <kerneldev@karsmulder.nl>,
	Kees Cook <keescook@chromium.org>,
	Masahiro Yamada <masahiroy@kernel.org>,
	Michal Marek <michal.lkml@markovi.net>,
	Thomas Gleixner <tglx@linutronix.de>,
	Tiezhu Yang <yangtiezhu@loongson.cn>,
	Will Deacon <will@kernel.org>, Yue Hu <huyue2@yulong.com>,
	linux-kbuild@vger.kernel.org, lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v5] kernel/trace: Add DISALLOW_TRACE_PRINTK make option
Date: Tue, 25 Aug 2020 08:38:27 +0800	[thread overview]
Message-ID: <CANMq1KCQjX1632qyo5+8kv8TXNu_Onh4gz7oMx3rx79XQX2fqg@mail.gmail.com> (raw)
In-Reply-To: <20200824093020.073ae8d8@oasis.local.home>

On Mon, Aug 24, 2020 at 9:30 PM Steven Rostedt <rostedt@goodmis.org> wrote:
>
> On Mon, 24 Aug 2020 10:59:13 +0800
> Nicolas Boichat <drinkcat@chromium.org> wrote:
>
> > ---
> >

> > +ifeq ($(KBUILD_DISALLOW_TRACE_PRINTK),1)
> > +KBUILD_CFLAGS += -DDISALLOW_TRACE_PRINTK
> > +endif
> > +
> >  KBUILD_CFLAGS += $(DEBUG_CFLAGS)
> >  export DEBUG_CFLAGS
> >
>
>
> There's one more thing we need to do, is if you build without this option
> then build with it, you should trigger a full kernel rebuild.
> Otherwise, if you build without the option, then build with it, and it
> doesn't rebuild the tree, it wont catch anything.

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:# -imultiarch x86_64-linux-gnu -D
__KERNEL__ -D DISALLOW_TRACE_PRINTK
kernel/bounds.s:# -imultiarch x86_64-linux-gnu -D __KERNEL__ -D
DISALLOW_TRACE_PRINTK
scripts/mod/devicetable-offsets.s:# -D DISALLOW_TRACE_PRINTK
(along with all *.cmd files)

and I suspect some/all of those force a complete kernel rebuild.

> -- Steve

  reply	other threads:[~2020-08-25  0:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-24  2:59 [PATCH v5] kernel/trace: Add DISALLOW_TRACE_PRINTK make option Nicolas Boichat
2020-08-24  8:26 ` David Laight
2020-08-24 13:28   ` Steven Rostedt
2020-08-24 13:42     ` Andy Shevchenko
2020-08-24 18:26       ` Steven Rostedt
2020-08-24 13:30 ` Steven Rostedt
2020-08-25  0:38   ` Nicolas Boichat [this message]
2020-08-26  1:39     ` Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CANMq1KCQjX1632qyo5+8kv8TXNu_Onh4gz7oMx3rx79XQX2fqg@mail.gmail.com \
    --to=drinkcat@chromium.org \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dianders@chromium.org \
    --cc=gpiccoli@canonical.com \
    --cc=groeck@chromium.org \
    --cc=huyue2@yulong.com \
    --cc=keescook@chromium.org \
    --cc=kerneldev@karsmulder.nl \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=will@kernel.org \
    --cc=yangtiezhu@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).