From: tip-bot for Andy Lutomirski <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: bp@alien8.de, mingo@kernel.org, hpa@zytor.com,
luto@amacapital.net, torvalds@linux-foundation.org,
tglx@linutronix.de, brgerst@gmail.com,
linux-kernel@vger.kernel.org, dvlasenk@redhat.com
Subject: [tip:x86/asm] x86/asm/entry/32: Improve a TOP_OF_KERNEL_STACK_PADDING comment
Date: Fri, 3 Apr 2015 01:21:05 -0700 [thread overview]
Message-ID: <tip-ff8287f36381deff729aa4e7b02296a080519fd0@git.kernel.org> (raw)
In-Reply-To: <41fee7bb8490ae840fe7ef2699f9c2feb932e729.1428002830.git.luto@kernel.org>
Commit-ID: ff8287f36381deff729aa4e7b02296a080519fd0
Gitweb: http://git.kernel.org/tip/ff8287f36381deff729aa4e7b02296a080519fd0
Author: Andy Lutomirski <luto@amacapital.net>
AuthorDate: Thu, 2 Apr 2015 12:41:44 -0700
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Fri, 3 Apr 2015 08:30:44 +0200
x86/asm/entry/32: Improve a TOP_OF_KERNEL_STACK_PADDING comment
At Denys' request, clean up the comment describing stack padding
in the 32-bit sysenter path.
No code changes.
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/41fee7bb8490ae840fe7ef2699f9c2feb932e729.1428002830.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/kernel/entry_32.S | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
index 4c8cc34..effa279 100644
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@ -395,10 +395,13 @@ sysenter_past_esp:
/*CFI_REL_OFFSET cs, 0*/
/*
* Push current_thread_info()->sysenter_return to the stack.
- * A tiny bit of offset fixup is necessary - 4*4 means the 4 words
- * pushed above; +8 corresponds to copy_thread's esp0 setting.
+ * A tiny bit of offset fixup is necessary: TI_sysenter_return
+ * is relative to thread_info, which is at the bottom of the
+ * kernel stack page. 4*4 means the 4 words pushed above;
+ * TOP_OF_KERNEL_STACK_PADDING takes us to the top of the stack;
+ * and THREAD_SIZE takes us to the bottom.
*/
- pushl_cfi ((TI_sysenter_return)-THREAD_SIZE+TOP_OF_KERNEL_STACK_PADDING+4*4)(%esp)
+ pushl_cfi ((TI_sysenter_return) - THREAD_SIZE + TOP_OF_KERNEL_STACK_PADDING + 4*4)(%esp)
CFI_REL_OFFSET eip, 0
pushl_cfi %eax
next prev parent reply other threads:[~2015-04-03 8:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-02 19:41 [PATCH 0/2] x86_32, asm: Minor stack/tss cleanups Andy Lutomirski
2015-04-02 19:41 ` [PATCH 1/2] x86_32, asm: Improve a TOP_OF_KERNEL_STACK_PADDING comment and long asm line Andy Lutomirski
2015-04-03 8:21 ` tip-bot for Andy Lutomirski [this message]
2015-04-02 19:41 ` [PATCH 2/2] x86_32: Stop caching MSR_IA32_SYSENTER_ESP in tss.sp1 Andy Lutomirski
2015-04-03 8:21 ` [tip:x86/asm] x86/asm/entry/32: " tip-bot for Andy Lutomirski
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=tip-ff8287f36381deff729aa4e7b02296a080519fd0@git.kernel.org \
--to=tipbot@zytor.com \
--cc=bp@alien8.de \
--cc=brgerst@gmail.com \
--cc=dvlasenk@redhat.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.