Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix incorrect syscall usage in tester/mapping1 test #243

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

BohdanQQ
Copy link

@BohdanQQ BohdanQQ commented Feb 20, 2025

In the /app/tester's mapping1 test case, NULL is passed into the as_get_physical_mapping syscall.
This results in the syscall correctly returning EPERM, as down the call stack the return value is determined by

// uspace_dst is our incoming NULL
rc = !memcpy_to_uspace(uspace_dst, src, size) ? EPERM : EOK;

(as memcpy_to_uspace returns 0 on failure) and the (unexpected) failure of the test case.

As this use of the syscall (passing NULL as the only out argument) is not reflective of real usage,
I only adjusted the call site. I also fixed a comment in the assembly which seems incorrect according
to System V x86-64 ABI.

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

Successfully merging this pull request may close these issues.

1 participant