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: <20130916191520.8844.qmail@science.horizon.com>
Date:	16 Sep 2013 15:15:20 -0400
From:	"George Spelvin" <linux@...izon.com>
To:	joe@...ches.com, linux@...izon.com
Cc:	akpm@...ux-foundation.org, dan.carpenter@...cle.com,
	JBeulich@...e.com, keescook@...omium.org,
	kosaki.motohiro@...il.com, linux-kernel@...r.kernel.org,
	penguin-kernel@...ove.sakura.ne.jp, viro@...iv.linux.org.uk
Subject: Re: [PATCH 1/2] remove all uses of printf's %n

> It'd be consistent with all the other %p<foo> types.
>
> vsnprintf is already weird enough with %p uses,
> there's absolutely no reason to stretch it further
> with yet another odd access/format style.

Well, all the other %p<foo> types actually *use* the void * argument.
They print the thing pointed to, just in different ways.

What I'm proposing is fundamentally different, and much more
"printf internals" specific.

I hate creating an interface that requires a dummy pointer argument.

This would already be quite different in , and I hate creating a
new interface that requires a dummy pointer argument.


One nonsensical combination that gcc does *not* complain about
is "%0-c".  (It does bitch about "%-0c", however.)

Is "%0-127c" too ugly to live?

Note that I could generalize it, and allow "%0-<width>" to mean
"left-align, with trailing padding to column <width>" for ANY format
specifier if that would help.  It's easy in the printf code to compute
the field width necessary to make that work.
ANSI C says that %0- is permitted and means the same thing as %-
(- overrides 0), but that could be bent.
--
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