xen: arm: Correctly handle exception injection from userspace on 64-bit.
authorIan Campbell <ian.campbell@citrix.com>
Tue, 12 Aug 2014 13:36:15 +0000 (15:36 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 12 Aug 2014 13:36:15 +0000 (15:36 +0200)
commita98669781769e821413dfef4ef99b93171375610
tree0728cd7cf483b192ab0d0d16d43b09eaba541e0d
parentfc0cafeab30fe93963457fafbad7a01c7f55ea5f
xen: arm: Correctly handle exception injection from userspace on 64-bit.

Firstly we must be prepared to propagate traps from 32-bit userspace even for
64-bit guests, so wrap the existing inject_undef??_exception into
inject_undef_exception and use that when injecting an undef exception. The
various other exception cases (aborts etc) already do this.

Secondly when injecting the trap we must pick the correct exception vector
depending on whether the source of the trap was 32-bit EL0, 64-bit EL0 or EL1.

This is part of CVE-2014-5147 / XSA-102.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Julien Grall <julien.grall@linaro.org>
xen/arch/arm/traps.c
xen/include/asm-arm/processor.h