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:   Wed, 3 Apr 2019 21:34:02 +0000
From:   Song Liu <songliubraving@...com>
To:     Thadeu Lima de Souza Cascardo <cascardo@...onical.com>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "acme@...nel.org" <acme@...nel.org>
Subject: Re: [PATCH] perf annotate: Fix build on 32 bit for BPF annotation



> On Apr 3, 2019, at 12:44 PM, Thadeu Lima de Souza Cascardo <cascardo@...onical.com> wrote:
> 
> Commit 6987561c9e86 ("perf annotate: Enable annotation of BPF programs") adds
> support for BPF programs annotations but the new code does not build on 32-bit.
> 
> Fixes: 6987561c9e86 ("perf annotate: Enable annotation of BPF programs")
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@...onical.com>

Acked-by: Song Liu <songliubraving@...com>

Thanks for the fix!
Song

> ---
> tools/perf/util/annotate.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
> index c8b01176c9e1..09762985c713 100644
> --- a/tools/perf/util/annotate.c
> +++ b/tools/perf/util/annotate.c
> @@ -1714,8 +1714,8 @@ static int symbol__disassemble_bpf(struct symbol *sym,
> 	if (dso->binary_type != DSO_BINARY_TYPE__BPF_PROG_INFO)
> 		return -1;
> 
> -	pr_debug("%s: handling sym %s addr %lx len %lx\n", __func__,
> -		 sym->name, sym->start, sym->end - sym->start);
> +	pr_debug("%s: handling sym %s addr %" PRIx64 " len %" PRIx64 "\n", __func__,
> +		  sym->name, sym->start, sym->end - sym->start);
> 
> 	memset(tpath, 0, sizeof(tpath));
> 	perf_exe(tpath, sizeof(tpath));
> @@ -1740,7 +1740,7 @@ static int symbol__disassemble_bpf(struct symbol *sym,
> 	info_linear = info_node->info_linear;
> 	sub_id = dso->bpf_prog.sub_id;
> 
> -	info.buffer = (void *)(info_linear->info.jited_prog_insns);
> +	info.buffer = (void *)(uintptr_t)(info_linear->info.jited_prog_insns);
> 	info.buffer_length = info_linear->info.jited_prog_len;
> 
> 	if (info_linear->info.nr_line_info)
> @@ -1776,7 +1776,7 @@ static int symbol__disassemble_bpf(struct symbol *sym,
> 		const char *srcline;
> 		u64 addr;
> 
> -		addr = pc + ((u64 *)(info_linear->info.jited_ksyms))[sub_id];
> +		addr = pc + ((u64 *)(uintptr_t)(info_linear->info.jited_ksyms))[sub_id];
> 		count = disassemble(pc, &info);
> 
> 		if (prog_linfo)
> -- 
> 2.20.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ