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: <CAP-5=fWm86UcwX+B_XjFSLFJF54QP2trYzJgJF0927h-AzSV_Q@mail.gmail.com>
Date: Fri, 11 Oct 2024 00:05:21 -0700
From: Ian Rogers <irogers@...gle.com>
To: Namhyung Kim <namhyung@...nel.org>
Cc: Stephen Rothwell <sfr@...b.auug.org.au>, Arnaldo Carvalho de Melo <acme@...nel.org>, 
	LKML <linux-kernel@...r.kernel.org>, linux-next@...r.kernel.org
Subject: Re: [PATCH] perf tools: Fix build failures on ppc64le

On Thu, Oct 10, 2024 at 11:34 PM Namhyung Kim <namhyung@...nel.org> wrote:
>
> On Fri, Oct 11, 2024 at 11:48:58AM +1100, Stephen Rothwell wrote:
> > Hi Namhyung,
> >
> > On Thu, 10 Oct 2024 16:57:43 -0700 Namhyung Kim <namhyung@...nel.org> wrote:
> > >
> > > Hi Stephen, can you please test if this patch fixes it?
> >
> > Sorry, I still get the same errors.
>
> Ok, thanks for the test.  I'll drop the series and rebase the branch.

Is this a define issue? I dislike that PPC has a #define
__SANE_USERSPACE_TYPES__, we might be trying to fix something
inherently insane.

The failure at:
```
    138 |         snprintf(path, PATH_MAX, "%s/event-%d-%llu-%d", dir,
        |                                               ~~~^
        |                                                  |
        |                                                  long long
unsigned int
        |                                               %lu
    139 |                  attr->type, attr->config, fd);
        |                              ~~~~~~~~~~~~
        |                                  |
        |                                  __u64 {aka long unsigned int}
  util/evsel.c:147:41: error: format '%llu' expects argument of type
'long long unsigned int',
                       but argument 4 has type '__u64' {aka 'long
unsigned int'} [-Werror=format=]
```
is for code moved from here:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/perf/tests/attr.c#n77
```
snprintf(path, PATH_MAX, "%s/event-%d-%llu-%d", dir,
attr->type, attr->config, fd);
```
ie the code is identical, so why does it compile in one file and not in another?

Elsewhere for PPC we carry:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/perf/tests/bp_account.c#n3
```
/*
 * Powerpc needs __SANE_USERSPACE_TYPES__ before <linux/types.h> to select
 * 'int-ll64.h' and avoid compile warnings when printing __u64 with %llu.
 */
#define __SANE_USERSPACE_TYPES__
```
Given the comment I suspect we need to do similar to fix this.
Stephen, could you test?

Thanks,
Ian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ