[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <75c074f7-ed3c-4302-a962-b62b6ff644f5@linux.ibm.com>
Date: Fri, 27 Jun 2025 18:19:05 +0200
From: Jens Remus <jremus@...ux.ibm.com>
To: Steven Rostedt <rostedt@...dmis.org>, linux-kernel@...r.kernel.org,
linux-trace-kernel@...r.kernel.org, bpf@...r.kernel.org,
x86@...nel.org
Cc: Masami Hiramatsu <mhiramat@...nel.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Josh Poimboeuf <jpoimboe@...nel.org>,
Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...nel.org>,
Jiri Olsa <jolsa@...nel.org>, Namhyung Kim <namhyung@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Andrii Nakryiko <andrii@...nel.org>,
Indu Bhagat <indu.bhagat@...cle.com>,
"Jose E. Marchesi" <jemarch@....org>,
Beau Belgrave <beaub@...ux.microsoft.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v6 07/12] unwind_user/sframe: Wire up unwind_user to
sframe
On 18.06.2025 00:50, Steven Rostedt wrote:
> From: Josh Poimboeuf <jpoimboe@...nel.org>
>
> Now that the sframe infrastructure is fully in place, make it work by
> hooking it up to the unwind_user interface.
>
> Signed-off-by: Josh Poimboeuf <jpoimboe@...nel.org>
> Signed-off-by: Steven Rostedt (Google) <rostedt@...dmis.org>
> diff --git a/kernel/unwind/user.c b/kernel/unwind/user.c
> @@ -41,17 +48,27 @@ static inline bool compat_state(struct unwind_user_state *state)
> int unwind_user_next(struct unwind_user_state *state)
> {
> struct unwind_user_frame *frame;
> + struct unwind_user_frame _frame;
> unsigned long cfa = 0, fp, ra = 0;
>
> if (state->done)
> return -EINVAL;
>
> - if (compat_state(state))
> + if (compat_state(state)) {
> frame = &compat_fp_frame;
> - else if (fp_state(state))
> + } else if (sframe_state(state)) {
> + /* sframe expects the frame to be local storage */
> + frame = &_frame;
> + if (sframe_find(state->ip, frame)) {
> + if (!IS_ENABLED(CONFIG_HAVE_UNWIND_USER_FP))
> + goto the_end;
Nit: s/the_end/done/
> + frame = &fp_frame;
> + }
> + } else if (fp_state(state)) {
> frame = &fp_frame;
> - else
> + } else {
> goto the_end;
> + }
>
> cfa = (frame->use_fp ? state->fp : state->sp) + frame->cfa_off;
>
Regards,
Jens
--
Jens Remus
Linux on Z Development (D3303)
+49-7031-16-1128 Office
jremus@...ibm.com
IBM
IBM Deutschland Research & Development GmbH; Vorsitzender des Aufsichtsrats: Wolfgang Wendt; Geschäftsführung: David Faller; Sitz der Gesellschaft: Böblingen; Registergericht: Amtsgericht Stuttgart, HRB 243294
IBM Data Privacy Statement: https://www.ibm.com/privacy/
Powered by blists - more mailing lists