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:   Fri, 24 May 2019 12:06:18 +0200
From:   Jiri Olsa <jolsa@...hat.com>
To:     Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:     Jiri Olsa <jolsa@...nel.org>,
        Jesper Dangaard Brouer <brouer@...hat.com>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        lkml <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Peter Zijlstra <a.p.zijlstra@...llo.nl>,
        Stanislav Fomichev <sdf@...ichev.me>,
        Song Liu <songliubraving@...com>,
        Adrian Hunter <adrian.hunter@...el.com>,
        Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCHv3 00/12] perf tools: Display eBPF code in intel_pt trace

On Thu, May 23, 2019 at 09:27:21PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Wed, May 08, 2019 at 03:19:58PM +0200, Jiri Olsa escreveu:
> > hi,
> > this patchset adds dso support to read and display
> > bpf code in intel_pt trace output. I had to change
> > some of the kernel maps processing code, so hopefully
> > I did not break too many things ;-)
> 
> One of these patches need some uintptr_t (IIRC) somewhere:
> 
>   CC       /tmp/build/perf/util/color_config.o
> util/dso.c: In function 'bpf_read':
> util/dso.c:725:8: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
>   buf = (u8 *) node->info_linear->info.jited_prog_insns;
>         ^

would something like below help? we already do that
in the annotation code

thanks,
jirka


---
diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c
index 6b8ef5b427f5..f0d9ca5805a6 100644
--- a/tools/perf/util/dso.c
+++ b/tools/perf/util/dso.c
@@ -722,7 +722,7 @@ static ssize_t bpf_read(struct dso *dso, u64 offset, char *data)
 	}
 
 	len = node->info_linear->info.jited_prog_len;
-	buf = (u8 *) node->info_linear->info.jited_prog_insns;
+	buf = (u8 *)(uintptr_t) node->info_linear->info.jited_prog_insns;
 
 	if (offset >= len)
 		return -1;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ