x86_64, traps: Fix the espfix64 #DF fixup and rewrite it in C
commit70443551ff6483f8d7a6f3457504e12c03270099
authorAndy Lutomirski <luto@amacapital.net>
Sun, 23 Nov 2014 02:00:31 +0000 (22 18:00 -0800)
committerWilly Tarreau <w@1wt.eu>
Sat, 13 Dec 2014 14:16:11 +0000 (13 15:16 +0100)
tree0051b8ab6edcd49f10f0b58eb73f69c3563feff0
parent0e62192bf1688f67d5a6cc1447c94319c320a09a
x86_64, traps: Fix the espfix64 #DF fixup and rewrite it in C

There's nothing special enough about the espfix64 double fault fixup to
justify writing it in assembly.  Move it to C.

This also fixes a bug: if the double fault came from an IST stack, the
old asm code would return to a partially uninitialized stack frame.

Fixes: 3891a04aafd668686239349ea58f3314ea2af86b
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit af726f21ed8af2cdaa4e93098dc211521218ae65)
[wt: backport notes for 2.6.32 :
  - Adaptations to entry_64.S in declaration of do_double_fault.
  - no exception_enter() in 2.6.32. Seems to be only for context tracking.
/wt]
Signed-off-by: Willy Tarreau <w@1wt.eu>
arch/x86/kernel/entry_64.S
arch/x86/kernel/traps.c