lkml.org 
[lkml]   [2019]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH] tracing/x86: Save CR2 before tracing irqsoff on error_entry
On Thu, Mar 21, 2019 at 09:33:17AM +0100, Peter Zijlstra wrote:

I'm thinking this problem wasn't new.

> idtentry page_fault do_page_fault has_error_code=1
> call error_entry
> TRACE_IRQS_OFF
> call trace_hardirqs_off*
> <tracer stuff>
> <fault> # modifies CR2

CALL_enter_from_user_mode
__context_tracking_exit()
trace_user_exit(0)
#PF

> call do_page_fault
> address = read_cr2(); /* whoopsie */

And that also isn't fixed by your patch.

I'm trying to make idtentry put cr2 in rdx, such that do_page_fault()
takes address as a 3rd argument, but I'm still fighting that context
tracking nonsense.

\
 
 \ /
  Last update: 2019-03-21 10:03    [W:0.099 / U:0.240 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site