Skip to content

Conversation

@lyakh
Copy link
Collaborator

@lyakh lyakh commented Nov 24, 2025

Fix userspace z_vrfy_* implementations. Fixes a recent regression, caused by 879ba45 from #10379

Copilot AI review requested due to automatic review settings November 24, 2025 08:44
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a regression in the userspace syscall verification functions (z_vrfy_fast_put and z_vrfy_fast_get) that was introduced in commit 879ba45 from PR #10379. The fix addresses compilation/runtime issues in the CONFIG_USERSPACE code path.

  • Corrected syscall marshalling include file names (removed incorrect 'mod_' prefix)
  • Removed invalid memory validation calls attempting to access non-existent heap->heap.heap structure
  • Properly organized includes for userspace syscall handlers

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lyakh lyakh requested a review from softwarecki November 24, 2025 10:50
Fix userspace z_vrfy_* implementations.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
@lyakh
Copy link
Collaborator Author

lyakh commented Nov 25, 2025

@lrudyX the PR only modifies code under #ifdef CONFIG_USERSPACE and AFAIK no QB tests are enabling that option, so the single failure of the HDA link DMA test in this PR cannot be related, please confirm

@lrudyX
Copy link

lrudyX commented Nov 25, 2025

@lrudyX the PR only modifies code under #ifdef CONFIG_USERSPACE and AFAIK no QB tests are enabling that option, so the single failure of the HDA link DMA test in this PR cannot be related, please confirm

One test failed. Not related.

@lgirdwood
Copy link
Member

Still no data on Jenkins, rerun.

@lgirdwood
Copy link
Member

SOFCI TEST

Copy link
Collaborator

@softwarecki softwarecki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this fixes a bug introduced due to the rushed review in #10379, I have to approve. However, I do not understand why these functions are turned into syscalls when the previous commit extended their parameter list with heap. It seems that for userspace modules fast_get should copy data to the heap accessible to the user, so the syscall is unnecessary. On the other hand, a syscall would make sense if we wanted to place the data in a read-only heap shared between modules, but then the heap parameter becomes redundant.

Regardless of that, please wrap all userspace-related changes in more specific ifdefs instead of the generic CONFIG_USERSPACE.

@lgirdwood lgirdwood merged commit 0bd5581 into thesofproject:main Nov 25, 2025
34 of 42 checks passed
@lyakh lyakh deleted the fastget-user branch November 26, 2025 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants