qemu-patch-raspberry4/target
Peter Maydell 548f514cf8 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.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180320134114.30418-5-peter.maydell@linaro.org
2018-03-23 18:26:46 +00:00
..
alpha cpu: get rid of unused cpu_init() defines 2018-03-19 14:10:36 -03:00
arm target/arm: Always set FAR to a known unknown value for debug exceptions 2018-03-23 18:26:46 +00:00
cris cpu: get rid of unused cpu_init() defines 2018-03-19 14:10:36 -03:00
hppa cpu: get rid of unused cpu_init() defines 2018-03-19 14:10:36 -03:00
i386 HMP fixes for 2.12 2018-03-20 18:03:10 +00:00
lm32 cpu: get rid of unused cpu_init() defines 2018-03-19 14:10:36 -03:00
m68k -----BEGIN PGP SIGNATURE----- 2018-03-20 14:19:23 +00:00
microblaze cpu: get rid of unused cpu_init() defines 2018-03-19 14:10:36 -03:00
mips cpu: get rid of unused cpu_init() defines 2018-03-19 14:10:36 -03:00
moxie cpu: get rid of unused cpu_init() defines 2018-03-19 14:10:36 -03:00
nios2 cpu: get rid of unused cpu_init() defines 2018-03-19 14:10:36 -03:00
openrisc cpu: get rid of unused cpu_init() defines 2018-03-19 14:10:36 -03:00
ppc cpu: get rid of unused cpu_init() defines 2018-03-19 14:10:36 -03:00
riscv Machine and x86 queue, 2018-03-19 2018-03-20 12:56:20 +00:00
s390x s390x/cpumodel: fix feature groups and breakage of MSA8 2018-03-23 09:05:42 +00:00
sh4 cpu: get rid of unused cpu_init() defines 2018-03-19 14:10:36 -03:00
sparc cpu: get rid of unused cpu_init() defines 2018-03-19 14:10:36 -03:00
tilegx cpu: get rid of unused cpu_init() defines 2018-03-19 14:10:36 -03:00
tricore cpu: get rid of unused cpu_init() defines 2018-03-19 14:10:36 -03:00
unicore32 cpu: get rid of unused cpu_init() defines 2018-03-19 14:10:36 -03:00
xtensa cpu: get rid of unused cpu_init() defines 2018-03-19 14:10:36 -03:00