Re: [RFC PATCH v2 14/15] unwind_user/backchain: Introduce back chain user space unwinding

From: Josh Poimboeuf

Date: Sun Dec 07 2025 - 10:10:49 EST


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?

--
Josh