lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 25 Aug 2020 08:38:27 +0800 From: Nicolas Boichat <drinkcat@...omium.org> To: Steven Rostedt <rostedt@...dmis.org> Cc: Douglas Anderson <dianders@...omium.org>, Guenter Roeck <groeck@...omium.org>, Andrew Morton <akpm@...ux-foundation.org>, Andy Shevchenko <andriy.shevchenko@...ux.intel.com>, Daniel Vetter <daniel.vetter@...ll.ch>, "Guilherme G. Piccoli" <gpiccoli@...onical.com>, Kars Mulder <kerneldev@...smulder.nl>, Kees Cook <keescook@...omium.org>, Masahiro Yamada <masahiroy@...nel.org>, Michal Marek <michal.lkml@...kovi.net>, Thomas Gleixner <tglx@...utronix.de>, Tiezhu Yang <yangtiezhu@...ngson.cn>, Will Deacon <will@...nel.org>, Yue Hu <huyue2@...ong.com>, linux-kbuild@...r.kernel.org, lkml <linux-kernel@...r.kernel.org> Subject: Re: [PATCH v5] kernel/trace: Add DISALLOW_TRACE_PRINTK make option On Mon, Aug 24, 2020 at 9:30 PM Steven Rostedt <rostedt@...dmis.org> wrote: > > On Mon, 24 Aug 2020 10:59:13 +0800 > Nicolas Boichat <drinkcat@...omium.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
Powered by blists - more mailing lists