From: Gayatri Vasudevan Date: Mon, 17 Sep 2018 18:03:30 +0000 (-0700) Subject: x86/ia32: Restore r8 correctly in 32bit SYSCALL instruction entry. X-Git-Tag: v4.1.12-124.31.3~506 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=af7594868ae722ef5abdfba2aa61fbd02aa2e67a;p=users%2Fjedix%2Flinux-maple.git x86/ia32: Restore r8 correctly in 32bit SYSCALL instruction entry. This commit fixes a bug in a previous commit 8e69671028ac ("x86/ia32: Adds code hygiene for 32bit SYSCALL instruction entry.") SAVE_EXTRA_REGS does not save the r8 register. r8 is rather saved in pt_regs->sp before it is cleared. So, retrieve r8 from pt_regs->sp. Orabug: 28529706 Signed-off-by: Gayatri Vasudevan Reviewed-by: Bert Barbe Signed-off-by: Brian Maly --- diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S index 6a52527eac06..bf4cd7336c6d 100644 --- a/arch/x86/ia32/ia32entry.S +++ b/arch/x86/ia32/ia32entry.S @@ -410,7 +410,7 @@ ENTRY(ia32_cstar_target) * 32bit zero extended */ ASM_STAC - movq R8(%rsp),%r8 + movq RSP(%rsp),%r8 1: movl (%r8),%r9d _ASM_EXTABLE(1b,ia32_badarg) ASM_CLAC