userspace: a subset of #10945 that can be applied already now#11017
Merged
Conversation
lyakh
requested review from
LaurentiuM1234,
abonislawski,
dbaluta,
iuliana-prodan,
kv2019i,
lbetlej,
lgirdwood,
marcinszkudlinski,
mmaka1,
pblaszko and
plbossart
as code owners
July 20, 2026 14:46
Contributor
There was a problem hiding this comment.
Pull request overview
This PR ports a small subset of #10945 into the current tree, focusing on userspace-LL related safety checks and small refactors in the Zephyr scheduler integration.
Changes:
- Add runtime assertions to prevent accessing kernel scheduler structures from user context (and to avoid calling certain helpers from the LL scheduler thread).
- Tighten userspace-LL API boundaries in
zephyr/schedule.cby clarifying and enforcing which getters are safe in which contexts. - Minor cleanup in
zephyr_ll.c(remove redundant cast) while attempting to gate LL task-info helpers.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
zephyr/schedule.c |
Adds/adjusts assertions around scheduler getter functions to enforce privileged-context usage. |
src/schedule/zephyr_ll.c |
Refactors LL scheduler task-info helpers (but currently introduces an incorrect compile-time guard). |
src/audio/component.c |
Adds an assertion to prevent accessing the global component driver list from the LL scheduler thread context. |
lgirdwood
reviewed
Jul 20, 2026
lgirdwood
left a comment
Member
There was a problem hiding this comment.
LGTM, except the opens by copilot which need resolved etc.
The global driver list should never be accessed from the audio context. Add an assertion for that. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
scheduler_get_data_for_core() returns void pointer, no need to type-cast it to other pointer types. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Both arch_schedulers_get() and arch_user_schedulers_get() should only be called from the privileged context. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
lgirdwood
approved these changes
Jul 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
3 minor changes from #10945