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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20161024112234.21898-1-kuleshovmail@gmail.com>
Date:   Mon, 24 Oct 2016 17:22:34 +0600
From:   Alexander Kuleshov <kuleshovmail@...il.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     Ingo Molnar <mingo@...hat.com>, "H . Peter Anvin" <hpa@...or.com>,
        Andy Lutomirski <luto@...nel.org>,
        Borislav Petkov <bp@...en8.de>,
        Paolo Bonzini <pbonzini@...hat.com>,
        linux-kernel@...r.kernel.org,
        Alexander Kuleshov <kuleshovmail@...il.com>
Subject: [PATCH] x86/entry64: move comment about informing of context tracking in right place

We are switching to kernel gsbase if an IRQ come from usermode with swpags.
Now there is comment which describes this:

  IRQ from user mode. Switch to kernel gsbase and inform context tracking that
  we're in kernel mode.

But now we execute swapgs, next TRACE_IRQS_OFF and only then the
CALL_enter_from_user_mode macro expands to the informing of
context tracking about this event. Let's move part of comment to
the right place where actual call to context tracing occured.

Signed-off-by: Alexander Kuleshov <kuleshovmail@...il.com>
---
 arch/x86/entry/entry_64.S | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
index ef766a3..5e97642 100644
--- a/arch/x86/entry/entry_64.S
+++ b/arch/x86/entry/entry_64.S
@@ -474,8 +474,7 @@ END(irq_entries_start)
 	jz	1f
 
 	/*
-	 * IRQ from user mode.  Switch to kernel gsbase and inform context
-	 * tracking that we're in kernel mode.
+	 * IRQ from user mode.  Switch to kernel gsbase.
 	 */
 	SWAPGS
 
@@ -489,6 +488,9 @@ END(irq_entries_start)
 	 */
 	TRACE_IRQS_OFF
 
+	/*
+	 * Inform context tracking that we're in kernel mode.
+	 */
 	CALL_enter_from_user_mode
 
 1:
-- 
2.8.0.rc3.1353.gea9bdc0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ