unicorn/qemu/target
Peter Maydell 92b5817d92
target/arm: Always set FAR to a known unknown value for debug exceptions
For debug exceptions due to breakpoints or the BKPT instruction which
are taken to AArch32, the Fault Address Register is architecturally
UNKNOWN. We were using that as license to simply not set
env->exception.vaddress, but this isn't correct, because it will
expose to the guest whatever old value was in that field when
arm_cpu_do_interrupt_aarch32() writes it to the guest IFSR. That old
value might be a FAR for a previous guest EL2 or secure exception, in
which case we shouldn't show it to an EL1 or non-secure exception
handler. It might also be a non-deterministic value, which is bad
for record-and-replay.

Clear env->exception.vaddress before taking breakpoint debug
exceptions, to avoid this minor information leak.

Backports commit 548f514cf89dd9ab39c0cb4c063097bccf141fdd from qemu
2018-03-25 16:38:14 -04:00
..
arm target/arm: Always set FAR to a known unknown value for debug exceptions 2018-03-25 16:38:14 -04:00
i386 cpu: Add Error argument to cpu_exec_init() 2018-03-21 07:50:33 -04:00
m68k cpu: Add Error argument to cpu_exec_init() 2018-03-21 07:50:33 -04:00
mips cpu: Add Error argument to cpu_exec_init() 2018-03-21 07:50:33 -04:00
sparc cpu: Add Error argument to cpu_exec_init() 2018-03-21 07:50:33 -04:00