Skip to content

Conversation

@github-actions
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
@wearyzen wearyzen self-requested a review October 22, 2025 15:12
@wearyzen wearyzen requested a review from ceolin October 23, 2025 09:30
@JarmouniA JarmouniA closed this Oct 23, 2025
@JarmouniA JarmouniA reopened this Oct 23, 2025
@github-project-automation github-project-automation bot moved this from Done to Needs more info in Backports Oct 23, 2025
@JarmouniA JarmouniA added this to the 4.2.2 milestone Oct 23, 2025
@zephyrbot zephyrbot added area: ARM ARM (32-bit) Architecture area: Architectures labels Oct 23, 2025
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Architectures area: ARM ARM (32-bit) Architecture Backport Backport PR and backport failure issues

Projects

Status: Needs more info

Development

Successfully merging this pull request may close these issues.

5 participants