[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <11b2438c-ef1f-423f-96c9-3005a75ec008@linux.ibm.com>
Date: Mon, 8 Dec 2025 16:38:16 +0100
From: Jens Remus <jremus@...ux.ibm.com>
To: Josh Poimboeuf <jpoimboe@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org,
linux-s390@...r.kernel.org, bpf@...r.kernel.org, x86@...nel.org,
Steven Rostedt <rostedt@...nel.org>,
Heiko Carstens <hca@...ux.ibm.com>, Vasily Gorbik <gor@...ux.ibm.com>,
Ilya Leoshkevich <iii@...ux.ibm.com>,
Masami Hiramatsu <mhiramat@...nel.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...nel.org>,
Jiri Olsa <jolsa@...nel.org>,
Arnaldo Carvalho de Melo <acme@...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>,
Florian Weimer <fweimer@...hat.com>, Kees Cook <kees@...nel.org>,
"Carlos O'Donell" <codonell@...hat.com>, Sam James <sam@...too.org>,
Dylan Hatch <dylanbhatch@...gle.com>
Subject: Re: [RFC PATCH v2 14/15] unwind_user/backchain: Introduce back chain
user space unwinding
Hello Josh,
thank you for your feedback!
On 12/7/2025 4:10 PM, Josh Poimboeuf wrote:
> On Fri, Dec 05, 2025 at 06:14:45PM +0100, Jens Remus wrote:
>> @@ -159,6 +165,10 @@ static int unwind_user_next(struct unwind_user_state *state)
>> if (!unwind_user_next_fp(state))
>> return 0;
>> continue;
>> + case UNWIND_USER_TYPE_BACKCHAIN:
>> + if (!unwind_user_next_backchain(state))
>> + return 0;
>> + continue; /* Try next method. */
>> default:
>> WARN_ONCE(1, "Undefined unwind bit %d", bit);
>> break;
>> @@ -187,6 +197,8 @@ static int unwind_user_start(struct unwind_user_state *state)
>> state->available_types |= UNWIND_USER_TYPE_SFRAME;
>> if (IS_ENABLED(CONFIG_HAVE_UNWIND_USER_FP))
>> state->available_types |= UNWIND_USER_TYPE_FP;
>> + if (IS_ENABLED(CONFIG_HAVE_UNWIND_USER_BACKCHAIN))
>> + state->available_types |= UNWIND_USER_TYPE_BACKCHAIN;
>
> Any reason not to just use the existing CONFIG_HAVE_UNWIND_USER_FP hook
> here rather than create the new BACKCHAIN one?
At first I thought this would not be a good idea, as my unwind user
backchain implementation relies on being standalone without using
unwind_user_next_common(). Mainly because s390 back chain unwinding
does not have fixed CFA, FP, and RA offsets/locations. But then I gave
it a try and it does not look that bad actually.
I'll send a RFC v3 soon.
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