[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-374a3a3916a70fc6236bc2b8f8ac02548a128a54@git.kernel.org>
Date: Sun, 11 Oct 2015 02:09:34 -0700
From: tip-bot for Borislav Petkov <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, tglx@...utronix.de,
peterz@...radead.org, mingo@...nel.org, luto@...capital.net,
brgerst@...il.com, luto@...nel.org, bp@...en8.de,
dvlasenk@...hat.com, hpa@...or.com, torvalds@...ux-foundation.org,
bp@...e.de
Subject: [tip:x86/asm] x86/entry/64/compat: Document sysenter_fix_flags'
s reason for existence
Commit-ID: 374a3a3916a70fc6236bc2b8f8ac02548a128a54
Gitweb: http://git.kernel.org/tip/374a3a3916a70fc6236bc2b8f8ac02548a128a54
Author: Borislav Petkov <bp@...en8.de>
AuthorDate: Fri, 9 Oct 2015 19:08:59 +0200
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Sun, 11 Oct 2015 11:06:40 +0200
x86/entry/64/compat: Document sysenter_fix_flags's reason for existence
The code under the label can normally be inline, without the
jumping back and forth but the latter is an optimization.
Document that.
Signed-off-by: Borislav Petkov <bp@...e.de>
Acked-by: Andy Lutomirski <luto@...nel.org>
Cc: Andy Lutomirski <luto@...capital.net>
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/20151009170859.GA24266@pd.tnic
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
arch/x86/entry/entry_64_compat.S | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/x86/entry/entry_64_compat.S b/arch/x86/entry/entry_64_compat.S
index cf9641c..92b0b27 100644
--- a/arch/x86/entry/entry_64_compat.S
+++ b/arch/x86/entry/entry_64_compat.S
@@ -102,6 +102,12 @@ ENTRY(entry_SYSENTER_compat)
* NT was set instead of doing an unconditional popfq.
* This needs to happen before enabling interrupts so that
* we don't get preempted with NT set.
+ *
+ * NB.: sysenter_fix_flags is a label with the code under it moved
+ * out-of-line as an optimization: NT is unlikely to be set in the
+ * majority of the cases and instead of polluting the I$ unnecessarily,
+ * we're keeping that code behind a branch which will predict as
+ * not-taken and therefore its instructions won't be fetched.
*/
testl $X86_EFLAGS_NT, EFLAGS(%rsp)
jnz sysenter_fix_flags
--
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