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

Re: [Xen-devel] [PATCH] x86/traps: Remove redundant trapnr parameter from fatal_trap()




On 09/01/14 12:27, Andrew Cooper wrote:
On 01/09/14 17:10, Don Slutz wrote:
On 09/01/14 06:06, Andrew Cooper wrote:
It is always available via regs->entry_vector.

Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CC: Jan Beulich <JBeulich@xxxxxxxx>
---

-void fatal_trap(int trapnr, const struct cpu_user_regs *regs)
+void fatal_trap(const struct cpu_user_regs *regs)
   {
       static DEFINE_PER_CPU(char, depth);
+    unsigned int trapnr = regs->entry_vector;
Should this be:

unsigned int trapnr = regs->entry_vector &
~(TRAP_regs_partial|TRAP_syscall);


To get rid of the extra bits?

   -Don Slutz
No; I don't think so.  There should be no paths into fatal_trap() which
would set these bits, as these bits are only set as a result of guest
sys/hypercall interaction, while fatal_trap() is a terminal error condition.

Furthermore, if a path is discovered then a) it will be more obvious
from the error message and b) we probably have a security problem to fix.

~Andrew

Ok.

Reviewed-by: Don Slutz <dslutz@xxxxxxxxxxx>


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


 


Rackspace

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