[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZxLeS7CQFIR8lTmo@x1>
Date: Fri, 18 Oct 2024 19:16:43 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Jiri Slaby <jirislaby@...nel.org>
Cc: Namhyung Kim <namhyung@...nel.org>, Howard Chu <howardchu95@...il.com>,
Adrian Hunter <adrian.hunter@...el.com>,
Ian Rogers <irogers@...gle.com>, Jiri Olsa <jolsa@...nel.org>,
Kan Liang <kan.liang@...el.com>, linux-perf-users@...r.kernel.org,
linux-kernel@...r.kernel.org, Song Liu <songliubraving@...com>,
Yonghong Song <yhs@...com>,
Arnaldo Carvalho de Melo <acme@...hat.com>
Subject: Re: [PATCH/RFT] Re: [PATCH v5 1/8] perf trace: Fix iteration of
syscall ids in syscalltbl->entries
On Mon, Oct 14, 2024 at 02:19:58PM +0200, Jiri Slaby wrote:
> On 10. 10. 24, 23:02, Arnaldo Carvalho de Melo wrote:
> > On Thu, Oct 10, 2024 at 09:31:54AM -0700, Namhyung Kim wrote:
> > > On Thu, Oct 10, 2024 at 09:29:01AM -0700, Namhyung Kim wrote:
> > > > On Thu, Oct 10, 2024 at 10:22:12AM +0200, Jiri Slaby wrote:
> > > > > Subject: [PATCH] perf: fix non-listed archs
> > > > > Suggested-by: Howard Chu <howardchu95@...il.com>
> > > > > Signed-off-by: Jiri Slaby <jslaby@...e.cz>
> > > > Acked-by: Namhyung Kim <namhyung@...nel.org>
> > > Also with,
> > > Fixes: 7a2fb5619cc1fb53 ("perf trace: Fix iteration of syscall ids in syscalltbl->entries")
> > > > Arnaldo, can you please pick this up for v6.12?
> > Sure, probably the safest bet now, but just in case, Jiri, can you test
> > the following?
> > From: Arnaldo Carvalho de Melo <acme@...hat.com>
> > Subject: [PATCH 1/1] perf tools arm: Generate syscalltbl.c from arm's syscall.tbl
>
> With this:
> +++ b/tools/perf/Makefile.config
> @@ -31,7 +31,7 @@ $(call detected_var,SRCARCH)
> ifneq ($(NO_SYSCALL_TABLE),1)
So after merging your changes (thanks) and finding an arm 32-bit system
(ressurecting a raspberry pi 3), I can build it, with bpf skels, etc but
then...
; } else if (size > 0 && size <= value_size) { /* struct */
83: (bf) r1 = r9
84: (07) r1 += -1
85: (67) r1 <<= 32
86: (77) r1 >>= 32
87: (25) if r1 > 0xfff goto pc+23
R0_w=map_value(id=0,off=0,ks=4,vs=24688,imm=0) R1_w=inv(id=0,umax_value=4095,var_off=(0x0; 0xfff)) R2_w=map_value(id=0,off=16,ks=4,vs=8272,imm=0) R3_w=inv(id=0) R6_w=map_value(id=0,off=20,ks=4,vs=24,imm=0) R7_w=map_value(id=0,off=56,ks=4,vs=8272,imm=0) R8_w=invP6 R9_w=inv(id=27,umax_value=4294967295,var_off=(0x0; 0xffffffff)) R10=fp0 fp-8=mmmmmmmm fp-16_w=map_value fp-24=map_value fp-32_w=invP40 fp-40=ctx fp-48=map_value fp-56_w=inv1 fp-64_w=map_value fp-72=map_value fp-80=map_value
; if (!bpf_probe_read_user(((struct augmented_arg *)payload_offset)->value, size, arg))
88: (79) r1 = *(u64 *)(r10 -16)
89: (bf) r2 = r9
90: (85) call bpf_probe_read_user#112
R0_w=map_value(id=0,off=0,ks=4,vs=24688,imm=0) R1_w=map_value(id=0,off=112,ks=4,vs=24688,imm=0) R2_w=inv(id=27,umax_value=4294967295,var_off=(0x0; 0xffffffff)) R3_w=inv(id=0) R6_w=map_value(id=0,off=20,ks=4,vs=24,imm=0) R7_w=map_value(id=0,off=56,ks=4,vs=8272,imm=0) R8_w=invP6 R9_w=inv(id=27,umax_value=4294967295,var_off=(0x0; 0xffffffff)) R10=fp0 fp-8=mmmmmmmm fp-16_w=map_value fp-24=map_value fp-32_w=invP40 fp-40=ctx fp-48=map_value fp-56_w=inv1 fp-64_w=map_value fp-72=map_value fp-80=map_value
R2 unbounded memory access, use 'var &= const' or 'if (var < const)'
processed 497 insns (limit 1000000) max_states_per_insn 2 total_states 23 peak_states 23 mark_read 15
-- END PROG LOAD LOG --
libbpf: prog 'sys_enter': failed to load: -13
libbpf: failed to load object 'augmented_raw_syscalls_bpf'
libbpf: failed to load BPF skeleton 'augmented_raw_syscalls_bpf': -13
Back at playing games with the BPF verifier:
root@...arius:~# uname -a
Linux aquarius 5.10.103-v7+ #1529 SMP Tue Mar 8 12:21:37 GMT 2022 armv7l GNU/Linux
root@...arius:~# clang-13 --version
Raspbian clang version 13.0.1-6~deb10u4+rpi1 (172.17.3.10:/build/git/l/llvm-toolchain-13 5bdfde6d6808bed4396414f7000db3d958040453)
Target: arm-unknown-linux-gnueabihf
Thread model: posix
InstalledDir: /usr/bin
root@...arius:~#
Will continue chasing windmills tomorrow...
- Arnaldo
Powered by blists - more mailing lists