From 8e1f6bf39f30d18efcdad4356a9093dd5f2730a7 Mon Sep 17 00:00:00 2001 From: Christian Borntraeger Date: Mon, 6 Jun 2011 14:14:38 +0200 Subject: [PATCH] [S390] kvm-s390: Fix host crash on misbehaving guests commit 2d2770e76a0af1510f79df4c617e3e879fde089d ([S390] kvm-390: Let kernel exit SIE instruction on work) fixed a problem of commit commit efc628a181265f2c6ec29842a8e8b245899e9b50 ([S390] virtualization aware cpu measurement) but uncovered another one. If a kvm guest accesses guest real memory that doesnt exist, the page fault handler calls the sie hook, which then rewrites the return psw from sie_inst to either sie_exit or sie_reenter. On return, the page fault handler will then detect the wrong access as a kernel fault causing a kernel oops in sie_reenter or sie_exit. We have to add these two addresses to the exception table to allow graceful exits. Signed-off-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky --- arch/s390/kvm/sie64a.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/s390/kvm/sie64a.S b/arch/s390/kvm/sie64a.S index ab0e041ac54cf..5faa1b1b23fa7 100644 --- a/arch/s390/kvm/sie64a.S +++ b/arch/s390/kvm/sie64a.S @@ -93,4 +93,6 @@ sie_err: .section __ex_table,"a" .quad sie_inst,sie_err + .quad sie_exit,sie_err + .quad sie_reenter,sie_err .previous -- 2.39.5