From: sashiko-bot@kernel.org
To: "Ian Rogers" <irogers@google.com>, linux-trace-kernel@vger.kernel.org
Cc: jpoimboe@kernel.org, rostedt@goodmis.org, peterz@infradead.org,
mingo@redhat.com, tglx@kernel.org, bp@alien8.de,
dave.hansen@linux.intel.com, x86@kernel.org,
catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com,
pjw@kernel.org, palmer@dabbelt.com, aou@eecs.berkeley.edu,
alex@ghiti.fr, acme@kernel.org, namhyung@kernel.org,
linux-perf-users@vger.kernel.org, mhiramat@kernel.org,
ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
bpf@vger.kernel.org, nathan@kernel.org, nsc@kernel.org,
linux-kbuild@vger.kernel.org, ojeda@kernel.org, ardb@kernel.org,
linux-efi@vger.kernel.org, "Marc Zyngier" <maz@kernel.org>,
"Oliver Upton" <oupton@kernel.org>,
kvmarm@lists.linux.dev, shuah@kernel.org, indu.bhagat@oracle.com,
jremus@linux.ibm.com, wnliu@google.com, dylanbhatch@google.com,
gary@garyguo.net
Subject: Re: [RFC PATCH v1 02/11] unwind_user: Support Minimal DWARF CFI user-space unwinding
Date: Mon, 23 Nov 2026 00:11:34 +0000 [thread overview]
Message-ID: <sashiko-outbox-228461@kernel.org> (raw)
In-Reply-To: <20261122235757.3456048-3-irogers@google.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] unwind_user: unguarded frame_pointer() call in
unwind_user_frame_pointer()
--
commit ad18f29bd8a6b46031b3d36b8ae44ab35c61c7c8
Author: Ian Rogers <irogers@google.com>
unwind_user: Support Minimal DWARF CFI user-space unwinding
This commit extends the generic user-space unwinder with
UNWIND_USER_TYPE_CFI to resolve ELF PT_GNU_EH_FRAME headers across
executable VMAs and enables 64-bit and 32-bit compat user unwinding on x86.
> diff --git a/include/linux/unwind_user.h b/include/linux/unwind_user.h
> index 64618618febde..dcd87012ab82c 100644
> --- a/include/linux/unwind_user.h
> +++ b/include/linux/unwind_user.h
> @@ -16,6 +16,12 @@
> #endif
>
> #ifndef unwind_user_at_function_start
> +/**
> + * unwind_user_at_function_start() - Default stub for function-entry detection
> + * @regs: User-mode register state.
> + *
> + * Return: false when the architecture does not override entry detection.
> + */
> static inline bool unwind_user_at_function_start(struct pt_regs *regs)
> {
> return false;
> @@ -23,6 +29,78 @@ static inline bool unwind_user_at_function_start(struct pt_regs *regs)
> #define unwind_user_at_function_start unwind_user_at_function_start
> #endif
>
> +#ifndef unwind_user_frame_pointer
> +/**
> + * unwind_user_frame_pointer() - Default helper returning @regs's frame pointer
> + * @regs: User-mode register state.
> + *
> + * Return: Architectural user frame pointer from frame_pointer(@regs).
> + */
> +static inline unsigned long unwind_user_frame_pointer(struct pt_regs *regs)
> +{
> + return frame_pointer(regs);
> +}
> +#define unwind_user_frame_pointer unwind_user_frame_pointer
> +#endif
[Severity: High]
Does defining unwind_user_frame_pointer() unconditionally break the build
on architectures that do not provide frame_pointer(regs)?
include/linux/unwind_deferred.h includes include/linux/unwind_user.h
outside CONFIG_UNWIND_USER, and core files such as kernel/exit.c include
include/linux/unwind_deferred.h on all architectures. Architectures like
LoongArch and s390 do not define frame_pointer(regs) in asm/ptrace.h, and
include/linux/unwind_user.h also does not include linux/ptrace.h before
referencing struct pt_regs and frame_pointer().
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261122235757.3456048-1-irogers@google.com?part=2
next prev parent reply other threads:[~2026-11-23 0:11 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-22 23:57 [RFC PATCH v1 00/11] unwind: Minimal DWARF CFI stack unwinding for x86, arm64, and riscv Ian Rogers
2026-11-22 23:57 ` Ian Rogers
2026-11-22 23:57 ` [RFC PATCH v1 01/11] unwind: Add Minimal DWARF CFI bytecode interpreter and KUnit tests Ian Rogers
2026-11-22 23:57 ` Ian Rogers
2026-11-23 0:11 ` sashiko-bot
2026-11-23 0:40 ` bot+bpf-ci
2026-11-23 0:40 ` bot+bpf-ci
2026-11-22 23:57 ` [RFC PATCH v1 02/11] unwind_user: Support Minimal DWARF CFI user-space unwinding Ian Rogers
2026-11-22 23:57 ` Ian Rogers
2026-11-23 0:11 ` sashiko-bot [this message]
2026-11-23 0:39 ` bot+bpf-ci
2026-11-23 0:39 ` bot+bpf-ci
2026-11-22 23:57 ` [RFC PATCH v1 03/11] scripts, unwind: Add build-time .eh_frame minifier Ian Rogers
2026-11-22 23:57 ` Ian Rogers
2026-11-23 0:40 ` bot+bpf-ci
2026-11-23 0:40 ` bot+bpf-ci
2026-11-22 23:57 ` [RFC PATCH v1 04/11] objtool/ibt: Ignore .eh_frame relocations during ENDBR validation Ian Rogers
2026-11-22 23:57 ` Ian Rogers
2026-11-22 23:57 ` [RFC PATCH v1 05/11] x86/unwind: Add Minimal DWARF CFI kernel unwinder Ian Rogers
2026-11-22 23:57 ` Ian Rogers
2026-11-23 0:56 ` bot+bpf-ci
2026-11-23 0:56 ` bot+bpf-ci
2026-11-22 23:57 ` [RFC PATCH v1 06/11] arm64: unwind_user: Support Minimal DWARF CFI and FP user unwinding Ian Rogers
2026-11-22 23:57 ` Ian Rogers
2026-11-23 0:16 ` sashiko-bot
2026-11-22 23:57 ` [RFC PATCH v1 07/11] arm64/unwind: Add Minimal DWARF CFI kernel unwinder Ian Rogers
2026-11-22 23:57 ` Ian Rogers
2026-11-23 0:24 ` sashiko-bot
2026-11-23 0:56 ` bot+bpf-ci
2026-11-23 0:56 ` bot+bpf-ci
2026-11-22 23:57 ` [RFC PATCH v1 08/11] riscv: unwind_user: Support Minimal DWARF CFI and FP user unwinding Ian Rogers
2026-11-22 23:57 ` Ian Rogers
2026-11-23 0:39 ` bot+bpf-ci
2026-11-23 0:39 ` bot+bpf-ci
2026-11-22 23:57 ` [RFC PATCH v1 09/11] riscv/unwind: Add Minimal DWARF CFI kernel unwinder Ian Rogers
2026-11-22 23:57 ` Ian Rogers
2026-11-23 0:24 ` sashiko-bot
2026-11-23 0:56 ` bot+bpf-ci
2026-11-23 0:56 ` bot+bpf-ci
2026-11-22 23:57 ` [RFC PATCH v1 10/11] selftests/perf_events: Add Minimal DWARF CFI deferred user unwind test Ian Rogers
2026-11-22 23:57 ` Ian Rogers
2026-11-23 0:40 ` bot+bpf-ci
2026-11-23 0:40 ` bot+bpf-ci
2026-11-22 23:57 ` [RFC PATCH v1 11/11] scripts: Add eh_frame_min.py .eh_frame coverage and size analyzer Ian Rogers
2026-11-22 23:57 ` Ian Rogers
2026-11-23 0:39 ` bot+bpf-ci
2026-11-23 0:39 ` bot+bpf-ci
2026-11-23 0:24 ` [RFC PATCH v1 00/11] unwind: Minimal DWARF CFI stack unwinding for x86, arm64, and riscv sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-228461@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=acme@kernel.org \
--cc=alex@ghiti.fr \
--cc=andrii@kernel.org \
--cc=aou@eecs.berkeley.edu \
--cc=ardb@kernel.org \
--cc=ast@kernel.org \
--cc=bp@alien8.de \
--cc=bpf@vger.kernel.org \
--cc=catalin.marinas@arm.com \
--cc=daniel@iogearbox.net \
--cc=dave.hansen@linux.intel.com \
--cc=dylanbhatch@google.com \
--cc=gary@garyguo.net \
--cc=indu.bhagat@oracle.com \
--cc=irogers@google.com \
--cc=jpoimboe@kernel.org \
--cc=jremus@linux.ibm.com \
--cc=kvmarm@lists.linux.dev \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=maz@kernel.org \
--cc=mhiramat@kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=nathan@kernel.org \
--cc=nsc@kernel.org \
--cc=ojeda@kernel.org \
--cc=oupton@kernel.org \
--cc=palmer@dabbelt.com \
--cc=peterz@infradead.org \
--cc=pjw@kernel.org \
--cc=rostedt@goodmis.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=shuah@kernel.org \
--cc=tglx@kernel.org \
--cc=will@kernel.org \
--cc=wnliu@google.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.