]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
x86/ia32: Restore r8 correctly in 32bit SYSCALL instruction entry.
authorGayatri Vasudevan <gayatri.vasudevan@oracle.com>
Mon, 17 Sep 2018 18:03:30 +0000 (11:03 -0700)
committerBrian Maly <brian.maly@oracle.com>
Mon, 8 Oct 2018 16:09:41 +0000 (12:09 -0400)
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 <gayatri.vasudevan@oracle.com>
Reviewed-by: Bert Barbe <bert.barbe@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
arch/x86/ia32/ia32entry.S

index 6a52527eac060f25e681bde99a186f3ab50843aa..bf4cd7336c6db685cad0d3f8a70d4c09fc647380 100644 (file)
@@ -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