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:	Wed, 7 Oct 2009 08:36:07 -0700 (PDT)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Alan Jenkins <alan-jenkins@...fmail.co.uk>
cc:	mingo@...hat.com, x86@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/7] printk: clean up return value



On Wed, 7 Oct 2009, Alan Jenkins wrote:
> 
> We could fix this up, but it seems pointless.  Callers don't really care
> about the extra characters added by printk().  Instead, let's return the
> length of the original message as formatted (and possibly truncated)
> by vscnprintf().

Hmm. I kind of agree with this, but at the same time I suspect that no 
caller should ever care about the loglevel characters (since they won't be 
_shown_), so your change still doesn't make it return a sensible value.

So I get the feeling that you should also add a

	message_len -= 3;

to the case where we peel off the "<.>" loglevel part at the head of the 
string. No?

Or we could just change it to 'void'. As Joe Perches says, nobody really 
cares deeply enough for this to generally even matter.

		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