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: <d2707550-36c2-45d3-ae76-f83b4c19f88c@gmail.com>
Date: Wed, 14 Feb 2024 08:49:02 -0700
From: David Ahern <dsahern@...il.com>
To: Andrea Claudi <aclaudi@...hat.com>,
 Stephen Hemminger <stephen@...workplumber.org>
Cc: netdev@...r.kernel.org, sgallagh@...hat.com
Subject: Re: [PATCH] iproute2: fix build failure on ppc64le

On 2/14/24 8:30 AM, Andrea Claudi wrote:
> On Fri, Feb 09, 2024 at 04:45:42PM -0800, Stephen Hemminger wrote:
>> On Fri, 9 Feb 2024 15:14:28 -0700
>> David Ahern <dsahern@...il.com> wrote:
>>
>>> On 2/9/24 9:35 AM, Stephen Hemminger wrote:
>>>> On Fri,  9 Feb 2024 11:24:47 +0100
>>>> Andrea Claudi <aclaudi@...hat.com> wrote:
>>>>   
>>>>> ss.c:3244:34: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘__u64’ {aka ‘long unsigned int’} [-Wformat=]
>>>>>  3244 |                 out(" rcv_nxt:%llu", s->mptcpi_rcv_nxt);
>>>>>       |                               ~~~^   ~~~~~~~~~~~~~~~~~
>>>>>       |                                  |    |
>>>>>       |                                  |    __u64 {aka long unsigned int}
>>>>>       |                                  long long unsigned int
>>>>>       |                               %lu
>>>>>
>>>>> This happens because __u64 is defined as long unsigned on ppc64le.  As
>>>>> pointed out by Florian Weimar, we should use -D__SANE_USERSPACE_TYPES__
>>>>> if we really want to use long long unsigned in iproute2.  
>>>>
>>>> Ok, this looks good.
>>>> Another way to fix would be to use the macros defined in inttypes.h
>>>>
>>>> 		out(" rcv_nxt:"PRIu64, s->mptcpi_rcv_nxt);
>>>>   
>>>
>>> since the uapi is __u64, I think this is the better approach.
>>
>> NVM
>> Tried it, but __u64 is not the same as uint64_t even on x86.
>> __u64 is long long unsigned int
>> uint64_t is long unsigned int
>>
> 
> Is there anything more I can do about this?
> 

where does the uint64_t come in? include/uapi/linux/mptcp.h has
mptcpi_rcv_nxt as __u64 and PRIu64 macros should be working without a
problem - this is what perf tool uses consistently.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ