diff options
| author | Christian Krinitsin <mail@krinitsin.com> | 2025-05-30 16:52:07 +0200 |
|---|---|---|
| committer | Christian Krinitsin <mail@krinitsin.com> | 2025-05-30 16:52:17 +0200 |
| commit | 9260319e7411ff8281700a532caa436f40120ec4 (patch) | |
| tree | 2f6bfe5f3458dd49d328d3a9eb508595450adec0 /gitlab/issues_text/target_missing/host_missing/accel_missing/2004 | |
| parent | 225caa38269323af1bfc2daadff5ec8bd930747f (diff) | |
| download | qemu-analysis-9260319e7411ff8281700a532caa436f40120ec4.tar.gz qemu-analysis-9260319e7411ff8281700a532caa436f40120ec4.zip | |
gitlab scraper: download in toml and text format
Diffstat (limited to 'gitlab/issues_text/target_missing/host_missing/accel_missing/2004')
| -rw-r--r-- | gitlab/issues_text/target_missing/host_missing/accel_missing/2004 | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/gitlab/issues_text/target_missing/host_missing/accel_missing/2004 b/gitlab/issues_text/target_missing/host_missing/accel_missing/2004 new file mode 100644 index 000000000..1b4b0cf69 --- /dev/null +++ b/gitlab/issues_text/target_missing/host_missing/accel_missing/2004 @@ -0,0 +1,33 @@ +do_guest_openat /proc interposition doesn't work for openat +Description of problem: +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 : 0 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : 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 : 0 +cpu family : PA-RISC 1.1e +cpu : PA7300LC (PCX-L2) +capabilities : os32 +model : 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`? |