[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] x86/debug: Make debugger_trap_entry() safe during early boot



>>> On 04.08.16 at 13:57, <andrew.cooper3@xxxxxxxxxx> wrote:
> debugger_trap_entry() is reachable during early boot where its unconditional
> use of current is unsafe.  Add a warning to the function to this effect.
> 
> Perform the vector check first, as this allows the compiler to elide the 
> other
> content from most of its callsites.  Check guest_mode(regs) before using
> current, which makes the path safe on early boot.
> 
> While editing this area, drop DEBUGGER_trap_{entry,fatal}, as hiding a 
> return
> statement in a function-like macro is very antisocial programming; show the
> real control flow at each of the callsites.  Finally, switch
> debugger_trap_{entry,fatal} to having boolean return types, to match their
> semantics.
> 
> No behavioural change.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.