Skip to content

Conversation

github-actions[bot]
Copy link

@github-actions github-actions bot commented Oct 9, 2025

Backport 0438b9f from #96850.

Fixes #97304

Use the privileged stack when starting K_USER threads in arch_new_thread().
Threads entering user mode with k_thread_user_mode_enter() keep their
existing flow. To support both cases, z_arm_userspace_enter() now takes an
internal ABI flag (sp_is_priv) indicating whether PSP already points to
the privileged stack.

Also fix calculation of the privileged stack top: use priv_stack_end
directly instead of priv_stack_start + CONFIG_PRIVILEGED_STACK_SIZE, which
failed to account for guard/FPU offsets applied to priv_stack_start.

Signed-off-by: Sudan Landge <[email protected]>
(cherry picked from commit 0438b9f)
@github-actions github-actions bot added the Backport Backport PR and backport failure issues label Oct 9, 2025
Copy link

sonarqubecloud bot commented Oct 9, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backport Backport PR and backport failure issues
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

1 participant