lkml.org 
[lkml]   [2005]   [Apr]   [26]   [last100]   RSS Feed
Views: [more markup]   [less markup]   [headers]   [forward]  
 
Messages in this thread
/
DateMon, 25 Apr 2005 21:06:28 -0700 (PDT)
FromLinus Torvalds <>
SubjectRe: [PATCH] x86_64: handle iret faults better

On Mon, 25 Apr 2005, Roland McGrath wrote:
>
> What would you think about a general hack to let given fixup table entries
> say the code wants the trap and error info made available (pushed on the
> stack or whatever)?

Yes, that sounds fine, if there is just some sane way to indicate that 
(normally the fixup eip is close to the faulting eip, so there should be 
tons of bits available, but it would need to be something clean? For iret, 
I guess we could just set fixup-eip to zero, which would mean "return to 
eip+1 and set error", but that sounds pretty hacky too)

> Conversely, would there be any harm in always setting
> ->thread.error_code and ->thread.trap_no for a kernel trap?  

Page-ins etc in kernel mode are normal, and they shouldn't set the thread 
state. So I think the "turn it into a trap" thing is nicer.

		Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-04-26 04:10    [W:1.278 / U:0.310 seconds]
©2003-2008 Jasper Spaans