1
0
mirror of https://github.com/containers/youki synced 2024-11-23 01:11:58 +01:00
youki/crates
yihuaf 3151278420 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 <yihuaf@unkies.org>
2023-07-23 17:44:37 -07:00
..
libcgroups Refactor the libcgroups interface (#2168) 2023-07-19 22:09:43 +09:00
libcontainer Implemented the clone fallback when clone3 returns ENOSYS 2023-07-23 17:44:37 -07:00
liboci-cli Liboci additional flags and subcommands, as required by ociplex (#2149) 2023-07-13 14:17:01 -07:00
youki refactored executor and executor manager (#2186) 2023-07-21 21:12:21 +09:00
.gitignore Add makefiles to crates and rust-integration-test 2022-01-31 15:08:34 +05:30