[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPhsuW5zUEeM3DAw-3OVNS9KmM2vG9B1GaR9KEKS_KFQo-VG9Q@mail.gmail.com>
Date: Mon, 29 Sep 2025 12:46:08 -0700
From: Song Liu <song@...nel.org>
To: Dylan Hatch <dylanbhatch@...gle.com>
Cc: Josh Poimboeuf <jpoimboe@...nel.org>, Steven Rostedt <rostedt@...dmis.org>,
Indu Bhagat <indu.bhagat@...cle.com>, Peter Zijlstra <peterz@...radead.org>,
Will Deacon <will@...nel.org>, Catalin Marinas <catalin.marinas@....com>,
Jiri Kosina <jikos@...nel.org>, Roman Gushchin <roman.gushchin@...ux.dev>,
Weinan Liu <wnliu@...gle.com>, Mark Rutland <mark.rutland@....com>, Ian Rogers <irogers@...gle.com>,
linux-toolchains@...r.kernel.org, linux-kernel@...r.kernel.org,
live-patching@...r.kernel.org, joe.lawrence@...hat.com,
Puranjay Mohan <puranjay@...nel.org>
Subject: Re: [PATCH v2 0/6] unwind, arm64: add sframe unwinder for kernel
On Thu, Sep 4, 2025 at 3:39 PM Dylan Hatch <dylanbhatch@...gle.com> wrote:
>
> This patchset implements a generic kernel sframe-based [1] unwinder.
> The main goal is to support reliable stacktraces on arm64.
>
> On x86 orc unwinder provides reliable stacktraces. But arm64 misses the
> required support from objtool: it cannot generate orc unwind tables for
> arm64.
>
> Currently, there's already a sframe unwinder proposed for userspace: [2].
> Since the sframe unwind table algorithm is similar, these two proposals
> could integrate common functionality in the future.
>
> Currently, only GCC supports sframe.
>
> These patches are based on v6.17-rc4 and are available on github [3].
>
> Ref:
> [1]: https://sourceware.org/binutils/docs/sframe-spec.html
> [2]: https://lore.kernel.org/lkml/cover.1730150953.git.jpoimboe@kernel.org/
> [3]: https://github.com/dylanbhatch/linux/tree/sframe-v2
I run the following test on this sframe-v2 branch:
bpftrace -e 'kprobe:security_file_open {printf("%s",
kstack);@count+=1; if (@count > 1) {exit();}}'
security_file_open+0
bpf_prog_eaca355a0dcdca7f_kprobe_security_file_open_1+16641632@...pftrace.bpf.o:0
path_openat+1892
do_filp_open+132
do_open_execat+84
alloc_bprm+44
do_execveat_common.isra.0+116
__arm64_sys_execve+72
invoke_syscall+76
el0_svc_common.constprop.0+68
do_el0_svc+32
el0_svc+56
el0t_64_sync_handler+152
el0t_64_sync+388
This looks wrong. The right call trace should be:
do_filp_open
=> path_openat
=> vfs_open
=> do_dentry_open
=> security_file_open
=> bpf_prog_eaca355a0dcdca7f_...
I am not sure whether this is just a problem with the bpf program,
or also with something else.
Thanks,
Song
Powered by blists - more mailing lists