On Thu, Jan 08, 2015 at 05:25:14PM +0100, Denys Vlasenko wrote:
> This is a preparatory patch for change in "struct pt_regs"
> handling in entry_64.S.
> 
> trace_hardirqs thunks were (ab)using a part of pt_regs
> handling code, namely SAVE_ARGS/RESTORE_ARGS macros,
> to save/restore registers across C function calls.
> 
> Since SAVE_ARGS is going to be changed, open-code
> register saving/restoring here.
> 
> Incidentally, this removes a bit of dead code:
> one SAVE_ARGS was used just to emit a CFI annotation,
> but it also generated unreachable assembly insns.
> 
> Signed-off-by: Denys Vlasenko <[email protected]>
> CC: Linus Torvalds <[email protected]>
> CC: Oleg Nesterov <[email protected]>
> CC: "H. Peter Anvin" <[email protected]>
> CC: Andy Lutomirski <[email protected]>
> CC: Frederic Weisbecker <[email protected]>
> CC: X86 ML <[email protected]>
> CC: Alexei Starovoitov <[email protected]>
> CC: Will Drewry <[email protected]>
> CC: Kees Cook <[email protected]>
> CC: [email protected]
> ---
>  arch/x86/lib/thunk_64.S | 29 ++++++++++++++++++++++++-----
>  1 file changed, 24 insertions(+), 5 deletions(-)

Hmm, this patch breaks booting my kvm guest: it stops booting at some
point and restarts itself after a couple of seconds.

The monitor says rIP points to ffffffff8167ae30 which is this:

ffffffff8167ae30 <async_page_fault>:
ffffffff8167ae30:       ff 15 fa 62 31 00       callq  *0x3162fa(%rip)        # 
ffffffff81991130 <pv_irq_ops+0x30>
ffffffff8167ae36:       48 83 ec 78             sub    $0x78,%rsp
ffffffff8167ae3a:       e8 d1 01 00 00          callq  ffffffff8167b010 
<error_entry>
ffffffff8167ae3f:       48 89 e7                mov    %rsp,%rdi
ffffffff8167ae42:       48 8b 74 24 78          mov    0x78(%rsp),%rsi
ffffffff8167ae47:       48 c7 44 24 78 ff ff    movq   
$0xffffffffffffffff,0x78(%rsp)
ffffffff8167ae4e:       ff ff 
ffffffff8167ae50:       e8 9b 9e 9c ff          callq  ffffffff81044cf0 
<do_async_page_fault>
ffffffff8167ae55:       e9 76 02 00 00          jmpq   ffffffff8167b0d0 
<error_exit>
ffffffff8167ae5a:       66 0f 1f 44 00 00       nopw   0x0(%rax,%rax,1)

HTH.

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to