blob: bb30b7f672f7560b3fb34ffa8d38609b710ccf4d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
architecture: 0.993
x86: 0.960
i386: 0.949
device: 0.946
performance: 0.931
graphic: 0.919
files: 0.864
peripherals: 0.849
debug: 0.815
semantic: 0.776
PID: 0.758
permissions: 0.728
user-level: 0.728
mistranslation: 0.720
network: 0.707
boot: 0.693
vnc: 0.638
register: 0.628
kernel: 0.624
socket: 0.595
ppc: 0.582
TCG: 0.565
assembly: 0.554
VMM: 0.525
risc-v: 0.457
arm: 0.453
hypervisor: 0.374
virtual: 0.184
KVM: 0.074
x86 user: icebp/int1 raises wrong signal
Description of problem:
This is a relatively minor inaccuracy. When `icebp` (`F1`) is executed, it raises `SIGILL` in QEMU, where the behavior on baremetal Linux (on an old Intel Core i5-430m) is to raise `SIGTRAP`.
Specifically, on the architectural level, `icebp` raises `#DB` without affecting `dr6`.
This also happens on an AArch64 host.
```
$ ./icebp
Trace/breakpoint trap
$ qemu-x86_64 ./icebp
qemu: uncaught target signal 4 (Illegal instruction) - core dumped
Illegal instruction
```
Steps to reproduce:
1. Compile this file using `gcc -nostdlib -static icebp.S -o icebp`, optionally with `-m32` to test i386
```
.globl _start
_start:
.byte 0xF1 // gas doesn't assemble this instruction opcode but it disassembles it
#ifdef __x86_64__
mov $60, %eax
syscall
#else
mov $1, %eax
int $0x80
#endif
```
2. Run on baremetal. Notice how it raises `SIGTRAP` according to the shell job control message
3. Run on qemu-user. Notice how it raises `SIGILL`.
|