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:	Thu, 2 Jul 2009 10:27:50 -0700 (PDT)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Joe Perches <joe@...ches.com>
cc:	Yinghai Lu <yinghai@...nel.org>, Ingo Molnar <mingo@...e.hu>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: printk regression?



On Wed, 1 Jul 2009, Joe Perches wrote:
> 
> There's at least 72 of them:
> 
> $ grep -Pr --include=*.[ch] "\bprintk.*\\\n.*KERN_" *

Yes. Most of these seem to be of the type that have just "\n" in front - 
probably exactly because the old code wasn't smart enough to notice the 
log-level unless it started a line.

For those cases, the trivial fix is to just remove the "\n". The new world 
order for printk is very much a simplification: the log-level is _always_ 
at the front of the printk, and printk will add the newline automatically 
if a log-level exists (unless it's KERN_CONT, of course).

So a simple

	sed 's/printk("\n"[ 	]*KERN_/printk(KERN_/'

should basically take care of it.

Of course, some cases are just crazy. Here's one:

	arch/m68knommu/kernel/traps.c:          printk(KERN_CONT "\n" KERN_EMERG " [%08lx] ", addr);

and I have no clue about why it would have KERN_CONT there. That makes 
little sense. Again, with the new printk logic, it really should be just

	printk(KERN_EMERG " [%08lx] ", addr);

and nothing odd.

		Linus
--
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