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

Userspace support: Introduce exit and close syscalls #509

Merged
merged 3 commits into from
Nov 11, 2024

Conversation

vijaydhanraj
Copy link
Contributor

@vijaydhanraj vijaydhanraj commented Nov 6, 2024

This is 4th PR in the userspace series. This PR implements exit and close syscalls.

Copy link
Member

@joergroedel joergroedel left a comment

Choose a reason for hiding this comment

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

This does implement the CLOSE but not the OPEN syscall, any reason for that?

@vijaydhanraj
Copy link
Contributor Author

Idea was to create a simple init process that would be able to launch a DM. For this basic model, we didn't need OPEN syscall that is the reason it isn't part of this PR. But we do plan to implement OPEN in the next set of userspace PRs.

Add exit() to be used as SYS_EXIT, which takes one exit code
as an input parameter according to the spec.

Co-developed-by: Vijay Dhanraj <[email protected]>
Signed-off-by: Chuanxiao Dong <[email protected]>
The close syscall is implemented by using the obj_remove, to remove the
ObjHandle associated with the input object id from the current task.

Co-developed-by: Vijay Dhanraj <[email protected]>
Signed-off-by: Chuanxiao Dong <[email protected]>
Implement Drop for the ObjHandle to close the underlying kernel object
when the ObjHandle is dropped in the user mode.

Co-developed-by: Vijay Dhanraj <[email protected]>
Signed-off-by: Chuanxiao Dong <[email protected]>
@vijaydhanraj
Copy link
Contributor Author

Rebased to latest main after PR #508 is merged.

@vijaydhanraj vijaydhanraj changed the title Userspace support: Introduce exit and open syscalls Userspace support: Introduce exit and close syscalls Nov 7, 2024
@joergroedel joergroedel merged commit b158a49 into coconut-svsm:main Nov 11, 2024
3 checks passed
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.

4 participants