summary refs log tree commit diff stats
path: root/gitlab/issues/target_missing/host_missing/accel_missing/2112.toml
diff options
context:
space:
mode:
authorChristian Krinitsin <mail@krinitsin.com>2025-05-21 21:21:26 +0200
committerChristian Krinitsin <mail@krinitsin.com>2025-05-21 21:21:26 +0200
commit4b927bc37359dec23f67d3427fc982945f24f404 (patch)
tree245449ef9146942dc7fffd0235b48b7e70a00bf2 /gitlab/issues/target_missing/host_missing/accel_missing/2112.toml
parentaa8bd79cec7bf6790ddb01d156c2ef2201abbaab (diff)
downloademulator-bug-study-4b927bc37359dec23f67d3427fc982945f24f404.tar.gz
emulator-bug-study-4b927bc37359dec23f67d3427fc982945f24f404.zip
add gitlab issues in toml format
Diffstat (limited to 'gitlab/issues/target_missing/host_missing/accel_missing/2112.toml')
-rw-r--r--gitlab/issues/target_missing/host_missing/accel_missing/2112.toml36
1 files changed, 36 insertions, 0 deletions
diff --git a/gitlab/issues/target_missing/host_missing/accel_missing/2112.toml b/gitlab/issues/target_missing/host_missing/accel_missing/2112.toml
new file mode 100644
index 00000000..413cb4ee
--- /dev/null
+++ b/gitlab/issues/target_missing/host_missing/accel_missing/2112.toml
@@ -0,0 +1,36 @@
+id = 2112
+title = "Limited Support for MIPS clone syscall in QEMU User Mode"
+state = "closed"
+created_at = "2024-01-18T16:21:33.616Z"
+closed_at = "2024-03-06T04:25:55.496Z"
+labels = ["Closed::WontFix", "kind::Feature Request"]
+url = "https://gitlab.com/qemu-project/qemu/-/issues/2112"
+host-os = "Ubuntu 20.04"
+host-arch = "X64"
+qemu-version = "8.1.3"
+guest-os = "Ubuntu 20.04"
+guest-arch = "MIPS"
+description = """Hello,
+
+I have been working with QEMU user mode to run programs based on the MIPS architecture and have encountered a limitation regarding the support for the MIPS clone syscall in the current implementation of QEMU user mode. Specifically, when invoking the clone syscall with certain flags, it results in the error "errno=22 (Invalid argument)" due to the absence of corresponding handling code in QEMU.
+
+Upon further investigation, I pinpointed the probable cause. QEMU user mode appears to check if the flags for the clone syscall include all the flags defined in CLONE_THREAD_FLAGS. If there is a mismatch, it returns "-TARGET_EINVAL".
+
+[source code](https://gitlab.com/qemu-project/qemu/-/blob/master/linux-user/syscall.c?ref_type=heads#L6564)
+
+The current CLONE_THREAD_FLAGS in QEMU are set to include: (CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_THREAD | CLONE_SYSVSEM).
+
+However, in my MIPS program, the flags are only: (CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND).
+
+Aligning my MIPS program to include all the flags as per CLONE_THREAD_FLAGS alters the clone syscall's behavior, deviating from the original semantics required by my MIPS program.
+
+I am seeking guidance on whether there is a way in QEMU user mode's MIPS syscall handling to exclusively use the flags (CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND). Alternatively, I am interested in any possible approach to enable support for the MIPS architecture's clone syscall in QEMU user mode.
+
+Thank you for your time and assistance."""
+reproduce = """1. Write a C program that utilizes the clone function, specifying the flags as: CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND.
+
+strace output: 
+```
+clone(CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND,child_stack=0x009359a8,parent_tidptr=0x00000f00,tls=0x00000003,child_tidptr=0x2b36d510) = -1 errno=22 (Invalid argument)
+```"""
+additional = "n/a"