-
Notifications
You must be signed in to change notification settings - Fork 57
feat(syscall): add clone3 support #79
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
base: main
Are you sure you want to change the base?
Conversation
|
Plz do not close and reopen one pr over and over again... 😢 |
Im SORRY. Some bugs fixed and I am adapting to the contribution process. Sorry teacher. |
I have tested the Asterinas testing program as per your request, and the main functional test results have been recorded in the discussion: https://github.com/orgs/Starry-OS/discussions/21 |
AsakuraMizu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using traits is overkill. I prefer to use type conversion to achieve uniformity.
| let args_ptr = args_ptr as *const Clone3Args; | ||
| let args = unsafe { args_ptr.vm_read_uninit()?.assume_init() }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may want to derive bytemuck::AnyBitPattern on Clone3Args to avoid the use of unsafe.
|
Sorry I forgot to commit my review 😢 |
Description
This PR adds initial support for the
clone3system call in StarryOS.The implementation introduces the basic
clone3syscall path and supportsa commonly used subset of
clone3flags, enabling user programs and teststo create new processes using the modern
clone3interface.This work lays the groundwork for improving Linux compatibility and enables
future support for thread creation and synchronization primitives built on
top of
clone3(e.g., futex-based threading).Implementation
clone3syscall handler and integrated it into the syscalldispatch framework.
clone3arguments and flags,including:
exit_signalCLONE_PARENT_SETTIDCHILD_CLEARTIDexpected Linux error semantics where possible.
Some Linux features related to
clone3(e.g., session/process group semanticsand
PR_SET_CHILD_SUBREAPER) are not yet supported in StarryOS and aredocumented as known limitations.
Additional Context
clone3test programsand passes basic functionality tests.
do not block the correctness of this initial
clone3support.focused on establishing a correct and minimal clone3 syscall foundation.