blob: ed3380c5847c18904ee61cc21e277aa91963e6df (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
mistranslation: 0.911
other: 0.862
instruction: 0.849
device: 0.848
semantic: 0.806
graphic: 0.765
socket: 0.447
boot: 0.420
vnc: 0.417
network: 0.381
assembly: 0.244
KVM: 0.142
sysret sets invalid ss
I'm developing an OS. I use only sysret to enter user space. When an interrupt occurred, it would GPF on iretq'ing from it. On investigating, the cs on the stack is 0x2b (valid and correct). The ss on the stack is 0x20, which has a rpl of 0 which is incorrect. iretq checks that and gpf's. Making the irq handler manually modify it to 0x23 fixes it locally.
This happens on the non-kvm'ed qemu. I haven't tried the kvm'ed one. Qemu version 0.12.5. I haven't tried with the current development version either.
Minor update, I found that I made a mistake with the value in STAR. I loaded 0x18 into the top 16 bits, so the bug is not that SS is 0x20 (which I thought to be wrong but was my own mistake). Why does it set CS=0x2b from that value & run?
|