diff options
| author | Christian Krinitsin <mail@krinitsin.com> | 2025-06-16 16:59:00 +0000 |
|---|---|---|
| committer | Christian Krinitsin <mail@krinitsin.com> | 2025-06-16 16:59:33 +0000 |
| commit | 9aba81d8eb048db908c94a3c40c25a5fde0caee6 (patch) | |
| tree | b765e7fb5e9a3c2143c68b0414e0055adb70e785 /results/classifier/118/x86/2004 | |
| parent | b89a938452613061c0f1f23e710281cf5c83cb29 (diff) | |
| download | emulator-bug-study-9aba81d8eb048db908c94a3c40c25a5fde0caee6.tar.gz emulator-bug-study-9aba81d8eb048db908c94a3c40c25a5fde0caee6.zip | |
add 18th iteration of classifier
Diffstat (limited to 'results/classifier/118/x86/2004')
| -rw-r--r-- | results/classifier/118/x86/2004 | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/results/classifier/118/x86/2004 b/results/classifier/118/x86/2004 new file mode 100644 index 00000000..337d0d63 --- /dev/null +++ b/results/classifier/118/x86/2004 @@ -0,0 +1,63 @@ +x86: 0.847 +device: 0.815 +files: 0.783 +mistranslation: 0.679 +ppc: 0.676 +graphic: 0.669 +architecture: 0.648 +semantic: 0.592 +network: 0.583 +PID: 0.566 +performance: 0.558 +TCG: 0.529 +socket: 0.523 +permissions: 0.517 +vnc: 0.503 +VMM: 0.487 +debug: 0.486 +risc-v: 0.466 +register: 0.436 +hypervisor: 0.432 +kernel: 0.403 +boot: 0.377 +arm: 0.348 +virtual: 0.341 +user-level: 0.301 +peripherals: 0.287 +KVM: 0.195 +assembly: 0.160 +i386: 0.113 + +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`? |