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-prev] [day] [month] [year] [list]
Message-ID: <tip-2f63b9db7260beba3c19d66d6c11b0b78ea84a8c@git.kernel.org>
Date:	Tue, 2 Jun 2015 01:25:15 -0700
From:	tip-bot for Jan Beulich <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	dvlasenk@...hat.com, jbeulich@...e.com, brgerst@...il.com,
	luto@...nel.org, hpa@...or.com, mingo@...nel.org, bp@...en8.de,
	JBeulich@...e.com, peterz@...radead.org,
	torvalds@...ux-foundation.org, luto@...capital.net,
	linux-kernel@...r.kernel.org, tglx@...utronix.de
Subject: [tip:x86/asm] x86/asm/entry/64: Fold identical code paths

Commit-ID:  2f63b9db7260beba3c19d66d6c11b0b78ea84a8c
Gitweb:     http://git.kernel.org/tip/2f63b9db7260beba3c19d66d6c11b0b78ea84a8c
Author:     Jan Beulich <JBeulich@...e.com>
AuthorDate: Mon, 1 Jun 2015 13:03:59 +0100
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Tue, 2 Jun 2015 10:10:09 +0200

x86/asm/entry/64: Fold identical code paths

retint_kernel doesn't require %rcx to be pointing to thread info
(anymore?), and the code on the two alternative paths is - not
really surprisingly - identical.

Signed-off-by: Jan Beulich <jbeulich@...e.com>
Cc: Andy Lutomirski <luto@...capital.net>
Cc: Andy Lutomirski <luto@...nel.org>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Brian Gerst <brgerst@...il.com>
Cc: Denys Vlasenko <dvlasenk@...hat.com>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: http://lkml.kernel.org/r/556C664F020000780007FB64@mail.emea.novell.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 arch/x86/kernel/entry_64.S | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
index b84cec5..4ad79e9 100644
--- a/arch/x86/kernel/entry_64.S
+++ b/arch/x86/kernel/entry_64.S
@@ -615,7 +615,7 @@ ret_from_intr:
 	testb	$3, CS(%rsp)
 	jz	retint_kernel
 	/* Interrupt came from user space */
-
+retint_user:
 	GET_THREAD_INFO(%rcx)
 	/*
 	 * %rcx: thread info. Interrupts off.
@@ -1194,15 +1194,9 @@ ENTRY(error_exit)
 	RESTORE_EXTRA_REGS
 	DISABLE_INTERRUPTS(CLBR_NONE)
 	TRACE_IRQS_OFF
-	GET_THREAD_INFO(%rcx)
 	testl %eax,%eax
 	jnz retint_kernel
-	LOCKDEP_SYS_EXIT_IRQ
-	movl TI_flags(%rcx),%edx
-	movl $_TIF_WORK_MASK,%edi
-	andl %edi,%edx
-	jnz retint_careful
-	jmp retint_swapgs
+	jmp retint_user
 END(error_exit)
 
 /* Runs on exception stack */
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ