On 22.03.19 15:51, Ralf Ramsauer wrote:
Without breaking the ARM_SMCCC_OWNER_ARCH case, we will fall through and
end up in the ARM_SMCCC_OWNER_SIP case which is clearly a mistake.

Fix this bug by adding the break statement for the ARM_SMCCC_OWNER_ARCH
case.

Fixes: 075879bd0d48 ("arm-common: crash cell on unhandled SMC traps")
Signed-off-by: Ralf Ramsauer <[email protected]>
---

Tested on a Jetson TX1 with a non-root Linux inmate.

  hypervisor/arch/arm-common/smccc.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/hypervisor/arch/arm-common/smccc.c 
b/hypervisor/arch/arm-common/smccc.c
index 77ca622f..5affa965 100644
--- a/hypervisor/arch/arm-common/smccc.c
+++ b/hypervisor/arch/arm-common/smccc.c
@@ -94,6 +94,7 @@ enum trap_return handle_smc(struct trap_context *ctx)
        case ARM_SMCCC_OWNER_ARCH:
                stats[JAILHOUSE_CPU_STAT_VMEXITS_SMCCC]++;
                ret = handle_arch(ctx);
+               break;
case ARM_SMCCC_OWNER_SIP:
                stats[JAILHOUSE_CPU_STAT_VMEXITS_SMCCC]++;


Thanks, applied.

Jan

--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

--
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to