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]
Message-Id: <20100304143837.af39845d.akpm@linux-foundation.org>
Date:	Thu, 4 Mar 2010 14:38:37 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Joe Perches <joe@...ches.com>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Nick Andrew <nick@...k-andrew.net>,
	linux-kernel@...r.kernel.org, Greg Kroah-Hartman <gregkh@...e.de>,
	netdev@...r.kernel.org
Subject: Re: [RESEND PATCH 0/2] Make functions of dev_<level> macros,
 recursive vsnprintf

On Wed,  3 Mar 2010 22:27:21 -0800
Joe Perches <joe@...ches.com> wrote:

> (Typo'ed Linus' email address, added Greg KH and netdev)

What is the networking significance here?

> dev_<level> macros use a lot of repetitive string space.
> 
> Eliminate the string prefixes and function arguments from all the macro uses
> and consolidate them in functions.
> 
> This patchset saves about 60K.
> 
> This implementation also adds the ability to use a struct va_format to
> emit a format string along with va_list arguments.
> 
> This %pV implementation should not be used without a wrapper that
> does printf argument verification like the dev_<level> functions.
> 
> Inspired a bit by Nick Andrew's patches and Linus' comments in December 2008
> http://lkml.org/lkml/2008/12/6/15
> http://lkml.org/lkml/2008/12/6/101
> 

Looks like a reasonable approach, although I didn't check how much
additional stack the recursion will take.  Bear in mind that printk()
can be called from super-deep contexts.

What would I need to do to make it recur more than once?  Include a %pV
in a string, like dev_printk("%s", %%pV")?


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ