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]
Date: Fri, 16 Feb 2024 10:57:36 +0100
From: Andrea Claudi <aclaudi@...hat.com>
To: David Ahern <dsahern@...il.com>
Cc: Stephen Hemminger <stephen@...workplumber.org>, netdev@...r.kernel.org,
	sgallagh@...hat.com
Subject: Re: [PATCH] iproute2: fix build failure on ppc64le

On Wed, Feb 14, 2024 at 08:10:54PM -0700, David Ahern wrote:
> On 2/14/24 8:05 PM, Stephen Hemminger wrote:
> > 
> > I just did this:
> > 
> > diff --git a/misc/ss.c b/misc/ss.c
> > index 5296cabe9982..679d50b8fef6 100644
> > --- a/misc/ss.c
> > +++ b/misc/ss.c
> > @@ -8,6 +8,7 @@
> >  #include <stdio.h>
> >  #include <stdlib.h>
> >  #include <unistd.h>
> > +#include <inttypes.h>
> >  #include <fcntl.h>
> >  #include <sys/ioctl.h>
> >  #include <sys/socket.h>
> > @@ -3241,7 +3242,7 @@ static void mptcp_stats_print(struct mptcp_info *s)
> >         if (s->mptcpi_snd_una)
> >                 out(" snd_una:%llu", s->mptcpi_snd_una);
> >         if (s->mptcpi_rcv_nxt)
> > -               out(" rcv_nxt:%llu", s->mptcpi_rcv_nxt);
> > +               out(" rcv_nxt:%" PRIu64, s->mptcpi_rcv_nxt);
> >         if (s->mptcpi_local_addr_used)
> >                 out(" local_addr_used:%u", s->mptcpi_local_addr_used);
> >         if (s->mptcpi_local_addr_max)
> > 
> > 
> > And got this:
> >     CC       ss.o
> > ss.c: In function ‘mptcp_stats_print’:
> > ss.c:3245:21: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘__u64’ {aka ‘long long unsigned int’} [-Wformat=]
> >  3245 |                 out(" rcv_nxt:%" PRIu64, s->mptcpi_rcv_nxt);
> >       |                     ^~~~~~~~~~~~         ~~~~~~~~~~~~~~~~~
> >       |                                           |
> >       |                                           __u64 {aka long long unsigned int}
> > In file included from ss.c:11:
> > /usr/include/inttypes.h:105:41: note: format string is defined here
> >   105 | # define PRIu64         __PRI64_PREFIX "u"
> > 
> 
> Andrea: can you check on how perf (kernel utils) compiles on ppc64le? I
> thought Arnaldo had build "farms" for all of the architectures; maybe
> not for this one. __u64 is used a lot in the perf_events UAPI and PRIu64
> is used extensively in the userspace code.

Sure, I'll look into perf and let you know.

Thanks,
Andrea


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ