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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 22 Sep 2007 04:51:08 +0200
From:	Oleg Verych <olecom@...wer.upol.cz>
To:	Andi Kleen <ak@...e.de>
Cc:	Chuck Ebbert <cebbert@...hat.com>, xemul@...nvz.org,
	patches@...-64.org, linux-kernel@...r.kernel.org
Subject: Killing printk calls for size (Re: [PATCH] [6/50] i386: clean up oops/bug reports)

* Sat, 22 Sep 2007 00:32:04 +0200 (CEST)
[]
>  arch/i386/kernel/traps.c |   16 ++++------------
>  arch/i386/mm/fault.c     |   13 +++++++------
>  2 files changed, 11 insertions(+), 18 deletions(-)

It seems, like size can be reduced even more now:

[]
>  		report_bug(regs->eip, regs);
>  
> -		printk(KERN_EMERG "%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter);
> +		printk(KERN_EMERG "%s: %04lx [#%d] ", str, err & 0xffff, ++die_counter);

  +		printk(KERN_EMERG "%s: %04lx [#%d] %s", str, err &0xffff, ++die_counter,

>  #ifdef CONFIG_PREEMPT
> -		printk(KERN_EMERG "PREEMPT ");
> -		nl = 1;
> +		printk("PREEMPT ");

  +		"PREEMPT "\

>  #endif
>  #ifdef CONFIG_SMP
> -		if (!nl)
> -			printk(KERN_EMERG);
>  		printk("SMP ");

  		"SMP "\

> -		nl = 1;
>  #endif
>  #ifdef CONFIG_DEBUG_PAGEALLOC
> -		if (!nl)
> -			printk(KERN_EMERG);
>  		printk("DEBUG_PAGEALLOC");

  		"DEBUG_PAGEALLOC"\

> -		nl = 1;
>  #endif
> -		if (nl)
> -			printk("\n");
> +		printk("\n");

  +		"\n");

Just hand waving.

FWIW, with more flexible kconfig, ifdiffery can be removed also...
____
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ