lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191107044109.22272-1-laijs@linux.alibaba.com>
Date:   Thu,  7 Nov 2019 04:41:09 +0000
From:   Lai Jiangshan <laijs@...ux.alibaba.com>
To:     linux-kernel@...r.kernel.org
Cc:     Lai Jiangshan <laijs@...ux.alibaba.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Andy Lutomirski <luto@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        "H. Peter Anvin" <hpa@...or.com>, x86@...nel.org
Subject: [PATCH untested] x86_32: fix extable entry for iret

3c88c692c287(x86/stackframe/32: Provide consistent pt_regs)
added code after label .Lirq_return and before 'iret', an instruction
which should be expected to be found in the extable when there is
an exception on it. But the extable entry stores the address of
.Lirq_return not the new address of 'iret', which disables
the corresponding fixup. This patch fixes the extable entry
by using a new label.

CC: Peter Zijlstra <peterz@...radead.org>
Signed-off-by: Lai Jiangshan <laijs@...ux.alibaba.com>
---
Purely accidently found, untested.

 arch/x86/entry/entry_32.S | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S
index f83ca5aa8b77..f62aa6655cfb 100644
--- a/arch/x86/entry/entry_32.S
+++ b/arch/x86/entry/entry_32.S
@@ -1081,6 +1081,7 @@ restore_all:
 	 * when returning from IPI handler and when returning from
 	 * scheduler to user-space.
 	 */
+.Lirq_return_ex:
 	INTERRUPT_RETURN
 
 restore_all_kernel:
@@ -1118,7 +1119,7 @@ ENTRY(iret_exc	)
 
 	jmp	common_exception
 .previous
-	_ASM_EXTABLE(.Lirq_return, iret_exc)
+	_ASM_EXTABLE(.Lirq_return_ex, iret_exc)
 ENDPROC(entry_INT80_32)
 
 .macro FIXUP_ESPFIX_STACK
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ