[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 10/11] linux-user: a crude hack for libcontainer (CLONE_PARENT
From: |
YAMAMOTO Takashi |
Subject: |
[PATCH v2 10/11] linux-user: a crude hack for libcontainer (CLONE_PARENT) [!MERGE] |
Date: |
Mon, 31 May 2021 14:50:17 +0900 |
runc uses clone() with a combination of flags which we don't
support. This commit works it around by ignoring CLONE_PARENT.
[!MERGE] because this is just a crude hack for the very specific
application.
Signed-off-by: YAMAMOTO Takashi <yamamoto@midokura.com>
---
linux-user/syscall.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 56a3c37d83..7645ed36e4 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -6553,6 +6553,8 @@ static int do_fork(CPUArchState *env, unsigned int flags,
abi_ulong newsp,
pthread_mutex_destroy(&info.mutex);
pthread_mutex_unlock(&clone_lock);
} else {
+ flags &= ~CLONE_PARENT; /* XXX crude hack for libcontainer. */
+
/* if no CLONE_VM, we consider it is a fork */
if (flags & CLONE_INVALID_FORK_FLAGS) {
return -TARGET_EINVAL;
--
2.21.1 (Apple Git-122.3)
- [PATCH v2 00/11] linux-user changes to run docker, YAMAMOTO Takashi, 2021/05/31
- [PATCH v2 01/11] linux-user: handle /proc/self/exe for execve, YAMAMOTO Takashi, 2021/05/31
- [PATCH v2 02/11] linux-user: Fix the execfd case of /proc/self/exe open, YAMAMOTO Takashi, 2021/05/31
- [PATCH v2 03/11] linux-user: dup the execfd on start up, YAMAMOTO Takashi, 2021/05/31
- [PATCH v2 04/11] linux-user: make exec_path realpath, YAMAMOTO Takashi, 2021/05/31
- [PATCH v2 05/11] linux-user: Implement pivot_root, YAMAMOTO Takashi, 2021/05/31
- [PATCH v2 06/11] linux-user: add get_exe_path, YAMAMOTO Takashi, 2021/05/31
- [PATCH v2 07/11] linux-user: simplify is_proc_myself, YAMAMOTO Takashi, 2021/05/31
- [PATCH v2 08/11] linux-user: Implement exec of /proc/$pid/exe of qemu process, YAMAMOTO Takashi, 2021/05/31
- [PATCH v2 09/11] linux-user: Make the qemu detection for /proc/$pid/exe a bit conservative, YAMAMOTO Takashi, 2021/05/31
- [PATCH v2 10/11] linux-user: a crude hack for libcontainer (CLONE_PARENT) [!MERGE],
YAMAMOTO Takashi <=
- [PATCH v2 11/11] linux-user: always assume preserve_argv0 for now [!MERGE], YAMAMOTO Takashi, 2021/05/31
- Re: [PATCH v2 00/11] linux-user changes to run docker, no-reply, 2021/05/31