lkml.org 
[lkml]   [2019]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [RFC][PATCH] tracing/x86: Save CR2 before tracing irqsoff on error_entry
On Thu, 21 Mar 2019 11:45:17 +0100
Peter Zijlstra <peterz@infradead.org> wrote:

> - .if \paranoid
> + .if \read_cr2
> + mov %cr2, %rdx /* XXX paravirt crap */
> + .endif
> +

I'm guessing this breaks paravirt, as that's one reason I didn't add
the read_rc in assembly.

I tested your code and it also fixes the issue, but needed to add this
to make it compile:

diff --git a/arch/x86/include/asm/traps.h b/arch/x86/include/asm/traps.h
index 7d6f3f3fad78..1530909fbf70 100644
--- a/arch/x86/include/asm/traps.h
+++ b/arch/x86/include/asm/traps.h
@@ -81,7 +81,7 @@ struct bad_iret_stack *fixup_bad_iret(struct bad_iret_stack *s);
void __init trap_init(void);
#endif
dotraplinkage void do_general_protection(struct pt_regs *regs, long error_code);
-dotraplinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code);
+dotraplinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code, unsigned long address);
dotraplinkage void do_spurious_interrupt_bug(struct pt_regs *regs, long error_code);
dotraplinkage void do_coprocessor_error(struct pt_regs *regs, long error_code);
dotraplinkage void do_alignment_check(struct pt_regs *regs, long error_code);

-- Steve

\
 
 \ /
  Last update: 2019-03-21 14:33    [W:1.036 / U:0.692 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site