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

Add support for SYS_clone3. #119

Closed
wants to merge 1 commit into from
Closed

Conversation

bartdesmet
Copy link

Fixes #115.

@@ -675,7 +694,7 @@ intercept_routine(struct context *context)
* the clone_child_intercept_routine instead, executing
* it on the new child threads stack, then returns to libc.
*/
if (desc.nr == SYS_clone && desc.args[1] != 0)
if (is_clone_syscall(desc.nr) && desc.args[1] != 0)
Copy link
Collaborator

@en4bz en4bz Oct 11, 2022

Choose a reason for hiding this comment

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

The arguments are not the same here. desc.args[1] is the stack pointer in clone. The stack pointer for clone3 is desc.args[0]->stack.

#ifdef SYS_clone3
else if(desc.nr == SYS_clone3 && ((struct clone_args*) desc.args[0])->stack != 0) {
    return (struct wrapper_ret){
				.rax = context->rax, .rdx = 2 };
}
#endif

@en4bz
Copy link
Collaborator

en4bz commented Oct 13, 2022

@andyrudoff ever since @GBuella left Intel there have been almost no updates to this project and small bugs like this are going unfixed. You're listed as the main contact for pmem so can you assign someone from your team to help merge these PRs or add me to the pmem group so that I merge these myself?

@en4bz
Copy link
Collaborator

en4bz commented Nov 23, 2022

Fixed, including tests, in #123

@en4bz en4bz closed this Nov 23, 2022
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.

Workaround SYS_clone3 in Ubuntu 22.04
2 participants