]> xenbits.xensource.com Git - xen.git/commit
x86/traps: Fix handling of #DB exceptions in hypervisor context
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 23 Mar 2018 17:03:42 +0000 (17:03 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 8 May 2018 17:13:13 +0000 (18:13 +0100)
commit75d6828bc2146d0eea16adc92376951a310d94a7
tree532f0558011a0fc0eb02119d7e723dd2647e7586
parent5d37af364dc158aa387f7c8b2a05c90325c63dce
x86/traps: Fix handling of #DB exceptions in hypervisor context

The WARN_ON() can be triggered by guest activities, and emits a full stack
trace without rate limiting.  Swap it out for a ratelimited printk with just
enough information to work out what is going on.

Not all #DB exceptions are traps, so blindly continuing is not a safe action
to take.  We don't let PV guests select these settings in the real %dr7 to
begin with, but for added safety against unexpected situations, detect the
fault cases and crash in an obvious manner.

This is part of XSA-260 / CVE-2018-8897

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/traps.c