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

Implemented the clone fallback when clone3 returns ENOSYS #2203

Merged
merged 2 commits into from
Aug 1, 2023

Commits on Jul 24, 2023

  1. Implemented the clone fallback when clone3 returns ENOSYS

    For a number of reasons, platforms can choose to block clone3 and force
    return ENOSYS. We implement a clone fallback in the case that we can't
    use clone3.
    
    Also, clone3 has no libc wrapper at this point. The current
    implementation calls the kernel version of the syscall directly. There
    are undefined behaviors potentially when we create process bypassing the
    libc. However, we have not observed any issue with our tests. This is
    likely because `youki` runs short lived process and calls exec or exit
    in the end. Nonetheless, we should have a backup plan and this change is
    our way out in the case that we discover clone3 has issue as the default
    code path.
    
    Remove the use of the clone3 crate. We use `clone3` is a very specific
    way to create a process. We don't have to support the many other flags
    and usecases of the `clone3` call. So it is simpler for us to use the
    libc crate directly for the syscall. This avoids an extra dependency and
    reduces our binary size.
    
    Signed-off-by: yihuaf <[email protected]>
    yihuaf committed Jul 24, 2023
    Configuration menu
    Copy the full SHA
    3151278 View commit details
    Browse the repository at this point in the history

Commits on Jul 31, 2023

  1. Add a hack-benchmark recipe

    We often use this to quickly get a sense of perf of a PR change.
    
    Signed-off-by: yihuaf <[email protected]>
    yihuaf committed Jul 31, 2023
    Configuration menu
    Copy the full SHA
    a67d180 View commit details
    Browse the repository at this point in the history