projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e76e044
)
arm: traps: check if SMC was conditional before handling it
author
Volodymyr Babchuk
<volodymyr_babchuk@epam.com>
Tue, 10 Oct 2017 15:52:43 +0000
(18:52 +0300)
committer
Stefano Stabellini
<sstabellini@kernel.org>
Wed, 11 Oct 2017 19:40:11 +0000
(12:40 -0700)
Trapped SMC instruction can fail condition check on ARMv8 architecture
(ARM DDI 0487B.a page D7-2271). So we need to check if condition was meet.
Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
xen/arch/arm/traps.c
patch
|
blob
|
history
diff --git
a/xen/arch/arm/traps.c
b/xen/arch/arm/traps.c
index ace5a4332214d92887a4f590ec93bd2275e162f6..5b91e6c340e81fd5ce444a4322243b4c7edeaa39 100644
(file)
--- a/
xen/arch/arm/traps.c
+++ b/
xen/arch/arm/traps.c
@@
-2199,6
+2199,12
@@
static void do_trap_smc(struct cpu_user_regs *regs, const union hsr hsr)
{
int rc = 0;
+ if ( !check_conditional_instr(regs, hsr) )
+ {
+ advance_pc(regs, hsr);
+ return;
+ }
+
if ( current->domain->arch.monitor.privileged_call_enabled )
rc = monitor_smc();