mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexander Kuleshov <kuleshovmail@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>, "H . Peter Anvin" <hpa@zytor.com>,
	Andy Lutomirski <luto@kernel.org>, Borislav Petkov <bp@alien8.de>,
	Paolo Bonzini <pbonzini@redhat.com>,
	linux-kernel@vger.kernel.org,
	Alexander Kuleshov <kuleshovmail@gmail.com>
Subject: [PATCH] x86/entry64: move comment about informing of context tracking in right place
Date: Mon, 24 Oct 2016 17:22:34 +0600	[thread overview]
Message-ID: <20161024112234.21898-1-kuleshovmail@gmail.com> (raw)

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@gmail.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

             reply	other threads:[~2016-10-24 11:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-24 11:22 Alexander Kuleshov [this message]
2016-11-03 11:24 ` Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161024112234.21898-1-kuleshovmail@gmail.com \
    --to=kuleshovmail@gmail.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®