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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
graphic: 0.870
mistranslation: 0.829
vnc: 0.820
device: 0.810
semantic: 0.747
instruction: 0.737
socket: 0.732
KVM: 0.680
network: 0.654
boot: 0.651
assembly: 0.592
other: 0.563
AArch64 emulation ignores SPSel=0 when taking (or returning from) an exception at EL1 or greater
The AArch64 emulation ignores SPSel=0 when:
(1) taking an interrupt from an exception level greater than EL0 (e.g., EL1t),
(2) returning from an exception (via ERET) to an exception level greater than EL0 (e.g., EL1t), with SPSR_ELx[SPSel]=0.
The attached patch fixes the problem in my application.
Background:
I'm running a standalone application (toy OS) that is performing preemptive multithreading between threads running at EL1t, with exception handling / context switching occurring at EL1h. This bug causes the stack pointer to be corrupted in the threads running at EL1t (they end up with a version of the EL1h stack pointer (SP_EL1)).
Occurs in:
qemu-2.1.0-rc1 (found in)
commit c60a57ff497667780132a3fcdc1500c83af5d5c0 (current master)
On Mon, Jul 28, 2014 at 07:40:56AM -0000, T McIntosh wrote:
> Public bug reported:
>
> The AArch64 emulation ignores SPSel=0 when:
>
> (1) taking an interrupt from an exception level greater than EL0 (e.g.,
> EL1t),
>
> (2) returning from an exception (via ERET) to an exception level greater
> than EL0 (e.g., EL1t), with SPSR_ELx[SPSel]=0.
>
> The attached patch fixes the problem in my application.
Hi,
Patches 1-3 in the following series fix the this problem.
http://lists.gnu.org/archive/html/qemu-devel/2014-06/msg03675.html
Cheers,
Edgar
The attachment "Proposed fix" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.
[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]
Uploaded fixed package for Vivid: https://launchpad.net/ubuntu/+source/qemu/2.1+dfsg-7ubuntu3
Please let me know if this fixes the issue.
This bug was fixed in the package qemu - 2.1+dfsg-7ubuntu3
---------------
qemu (2.1+dfsg-7ubuntu3) vivid; urgency=medium
* d/p/target-arm-A64-Break-out-aarch64_save-restore_sp.patch
d/p/target-arm-A64-Respect-SPSEL-in-ERET-SP-restore.patch
d/p/target-arm-A64-Respect-SPSEL-when-taking-exceptions.patch:
Cherry-pick of upstream patches in order to fix AArch64 emulation ignoring
SPSel=0 in certain conditions. (LP: #1349277)
-- Chris J Arges <email address hidden> Thu, 04 Dec 2014 14:17:01 -0600
|