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: <alpine.LFD.2.00.0812060917220.3425@nehalem.linux-foundation.org>
Date:	Sat, 6 Dec 2008 09:27:26 -0800 (PST)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Nick Andrew <nick@...k-andrew.net>
cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH v1 2/3] Add %v support to vsnprintf()



On Sat, 6 Dec 2008, Nick Andrew wrote:
>
> Add %v support to vsnprintf()

No can do. gcc will always warn, and I don't want to see an extension that 
will generate unfixable warnings.

If you want to do this, you'd need to do it the same way we did some othe 
printf extensions, ie by not passing the valist entry itself, but 
passing the _pointer_ to it, and using "%pV" as the format modifier.

(Quite frankly, "va_list" can be rather large, so passing a pointer to it 
is probably a better idea anyway).

Of course, gcc may implement "va_list" as an array (or just a pointer) 
internally, and then it will be passed as a pointer anyway (and you'd not 
need the address-of), but that's certainly not in any way guaranteed, and 
is very possibly architecture-dependent.

			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