[#88] Draft of foundations for clone3() syscall & friends#115
Draft
michalfita wants to merge 1 commit intonuta:mainfrom
Draft
[#88] Draft of foundations for clone3() syscall & friends#115michalfita wants to merge 1 commit intonuta:mainfrom
clone3() syscall & friends#115michalfita wants to merge 1 commit intonuta:mainfrom
Conversation
Owner
|
Fantastic! I'll check this tomorrow 😃 |
nuta
reviewed
Dec 12, 2021
Owner
nuta
left a comment
There was a problem hiding this comment.
Thank you for the great work! Generally looks good to me so I'll leave just some nitpicks.
|
|
||
| bitflags! { | ||
| /// Flags used by [`clone()`] system call | ||
| /// Source: `/usr/include/linux/sched.h` |
Owner
There was a problem hiding this comment.
Please avoid copying from the Linux source code even for a definition like this. Please refer musl instead.
| /// | ||
| /// [`clone()`]: https://linux.die.net/man/2/clone | ||
| pub struct CloneFlags : c_uint { | ||
| const CLONE_VM = 0x00000100; // set if VM shared between processes |
Owner
There was a problem hiding this comment.
Please avoid adding a comment at the end of the line and add a full stop at the end of the comment.
Suggested change
| const CLONE_VM = 0x00000100; // set if VM shared between processes | |
| /// Set if VM shared between processes. | |
| const CLONE_VM = 0x00000100; |
|
|
||
| #[repr(C, align(8))] | ||
| pub struct CloneArgs { | ||
| flags: u64, |
| } | ||
| } | ||
|
|
||
| #[repr(C, align(8))] |
Owner
There was a problem hiding this comment.
Nit: Why do you need align(8) here?
This was referenced Mar 23, 2022
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.
This is draft for bringing in resolution for #88. The whole work is pretty complex, so probably would need to be split into pieces. I already defined a few things to fix first for get this any further.
I don't have much time to work on it, but I'll tray to add bits into it as time allows. Till then please look and comment.
Any input appreciated.