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:   Sat, 1 Aug 2020 10:42:15 +0900
From:   Sergey Senozhatsky <sergey.senozhatsky@...il.com>
To:     Steven Rostedt <rostedt@...dmis.org>, Joe Perches <joe@...ches.com>
Cc:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Petr Mladek <pmladek@...e.com>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        linux-kernel@...r.kernel.org,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        Pantelis Antoniou <pantelis.antoniou@...sulko.com>,
        Rob Herring <robh@...nel.org>,
        Grant Likely <grant.likely@....com>
Subject: Re: [PATCH v2 2/3] lib/vsprintf: Replace custom spec to print
 decimals with generic one

On (20/07/31 16:48), Steven Rostedt wrote:
[..]
> > > -	static const struct printf_spec num_spec = {
> > > -		.flags = SMALL,
> > > -		.field_width = -1,
> > > -		.precision = -1,
> > > -		.base = 10,
> > > -	};
> > >  
> > >  	struct printf_spec str_spec = spec;
> > >  	str_spec.field_width = -1;
> > > @@ -2024,7 +2018,7 @@ char *device_node_string(char *buf, char *end, struct device_node *dn,
> > >  			str_spec.precision = precision;
> > >  			break;
> > >  		case 'p':	/* phandle */
> > > -			buf = number(buf, end, (unsigned int)dn->phandle, num_spec);
> > > +			buf = number(buf, end, (unsigned int)dn->phandle, default_dec_spec);  
> > 
> > Could changing .precision = -1 to 0 change any output?
> > 
> 
> static const struct printf_spec default_dec_spec = {
> 	.base = 10,
> 	.precision = -1,
> };
> 
> 
> It's the field_width that changes from -1 to 0, which shouldn't cause
> any issue.

That's a good question, both .field_width and .precision are now zeroes,
and not -1. But it seems that this doesn't change anything in the end.

Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@...il.com>

	-ss

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ