summary refs log tree commit diff stats
path: root/gitlab/issues/target_missing/host_missing/accel_missing/2004.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/2004.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/2004.toml')
-rw-r--r--gitlab/issues/target_missing/host_missing/accel_missing/2004.toml45
1 files changed, 45 insertions, 0 deletions
diff --git a/gitlab/issues/target_missing/host_missing/accel_missing/2004.toml b/gitlab/issues/target_missing/host_missing/accel_missing/2004.toml
new file mode 100644
index 00000000..b3344780
--- /dev/null
+++ b/gitlab/issues/target_missing/host_missing/accel_missing/2004.toml
@@ -0,0 +1,45 @@
+id = 2004
+title = "do_guest_openat /proc interposition doesn't work for openat"
+state = "opened"
+created_at = "2023-11-24T17:09:30.952Z"
+closed_at = "n/a"
+labels = ["linux-user"]
+url = "https://gitlab.com/qemu-project/qemu/-/issues/2004"
+host-os = "All"
+host-arch = "All"
+qemu-version = "8.1.2"
+guest-os = "Linux"
+guest-arch = "All"
+description = """For instance, trying with hppa emulated on top of x86:
+
+```
+$ hppa-linux-gnu-gcc test.c -o test
+$ qemu-hppa-static ./test
+```
+
+One gets the host cpu information:
+
+```
+processor\t: 0
+vendor_id\t: GenuineIntel
+cpu family\t: 6
+model\t\t: 142
+model name\t: Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz
+[...]
+```
+
+while we would want to see the guest cpu information, like the test program does when `#if 0` is turned into `#if 1`:
+
+```
+processor\t: 0            
+cpu family\t: PA-RISC 1.1e
+cpu\t\t: PA7300LC (PCX-L2)
+capabilities\t: os32
+model\t\t: 9000/778/B160L - Merlin L2 160 QEMU (9000/778/B160L)
+```
+
+This is because `do_guest_openat` only checks for the path, and does not look at `dirfd`, so it doesn't recognize that `openat(dirfd, "cpuinfo", O_RDONLY)` is actually opening a file in `/proc`.
+
+We could probably, when `dirfd` is not `AT_FDCWD`, try to `fstat()` it, open `/proc` with `O_DIRECTORY` and `fstat()` that too, and compare their `st_dev` and `st_ino`?"""
+reproduce = "n/a"
+additional = "n/a"