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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150916174536.GE3243@mtj.duckdns.org>
Date:	Wed, 16 Sep 2015 13:45:36 -0400
From:	Tejun Heo <tj@...nel.org>
To:	Rasmus Villemoes <linux@...musvillemoes.dk>
Cc:	Maurizio Lombardi <mlombard@...hat.com>, joe@...ches.com,
	linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 0/3] fix *pbl format support

Hello,

On Wed, Sep 16, 2015 at 02:27:23PM +0200, Rasmus Villemoes wrote:
> If we want to fix the problem with 3/3, then this seems obviously
> necessary. There may be stuff we want to optimize later (for example, I
> don't think we should always make a local copy of the entire struct; if
> we're only modifying one of the fields, it's better to copy that field
> to a local variable and use that).

Yeap.

...
> I may have misread, or it might be fixable, but I really don't like
> playing these subtle games. snprintf already provides a method to
> reliably detect truncation; it is up to the user to decide whether and
> how to deal with that. But yes, this of course requires that snprintf
> actually attempted to format the entire bitmap, which in turn requires
> some way to pass the correct size all the way through to the bitmap
> formatter.

Agreed again.

> > PATCH 3 increases the size of printf_spec.field_width (from s16 to s32).
> 
> I'm not yet completely convinced this is the right solution. Obviously,
> if other problems with the small .field_width size show up, this might
> be necessary, but as long as it's only the %pb formatter (and so far
> only a single user of that), I think smaller/other hammers should be
> thought about. So far I think there've been two alternatives: (1)
> reintroduce the dedicated bitmap pretty printer(s), (2) my half-ugly
> proposal allowing the user to pass struct printf_bitmap to the %pbh[l]
> specifier. I'll try to actually code up (2).

I suppose (2) could work too but we really should strive to provide
something convenient to print[fk] users.  The balance here is pretty
one-sided.

Thanks.

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