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] [day] [month] [year] [list]
Message-ID: <20181219140218.60d0cab7@xeon-e3>
Date:   Wed, 19 Dec 2018 14:02:18 -0800
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Serhey Popovych <serhe.popovych@...il.com>
Cc:     netdev@...r.kernel.org, dedeckeh@...il.com
Subject: Re: [PATCH iproute2] fix print_0xhex on 32 bit

On Wed, 19 Dec 2018 22:00:38 +0200
Serhey Popovych <serhe.popovych@...il.com> wrote:

> Stephen Hemminger wrote:
> 
> > The argument to print_0xhex is converted to unsigned long long
> > so the format string give for normal printout has to be some
> > variant of %llx. Otherwise, bogus values will be printed on
> > 32 bit platforms.  
> 
> Sorry it is too late and change is merged as commit 90c5c969f0b9
> ("fix print_0xhex on 32 bit") but I want to ask following:
> 
>   $ printf '0x%llx != %#llx\n' 0 0
>   0x0 != 0
> 
> So we potentially can get "tos 0" vs "tos 0x0" previously. Is that
> expected and will not cause any compatibility problems?
> 
> It is clear that 0 is always zero, but some code may rely on 0x form
> even for zero. What do you think?
> 
> Thanks.
> 
> 

Hmm. that is a surprise. we can change back if it matters.
Was just trying to be consistent.  Since most code that scraps is going to use strtoul(str, NULL, 16)
it shouldn't matter.

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ