From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753503AbbDCIcQ (ORCPT ); Fri, 3 Apr 2015 04:32:16 -0400 Received: from terminus.zytor.com ([198.137.202.10]:44811 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751430AbbDCIVd (ORCPT ); Fri, 3 Apr 2015 04:21:33 -0400 Date: Fri, 3 Apr 2015 01:21:05 -0700 From: tip-bot for Andy Lutomirski Message-ID: 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 Reply-To: linux-kernel@vger.kernel.org, brgerst@gmail.com, dvlasenk@redhat.com, bp@alien8.de, mingo@kernel.org, tglx@linutronix.de, torvalds@linux-foundation.org, luto@amacapital.net, hpa@zytor.com In-Reply-To: <41fee7bb8490ae840fe7ef2699f9c2feb932e729.1428002830.git.luto@kernel.org> References: <41fee7bb8490ae840fe7ef2699f9c2feb932e729.1428002830.git.luto@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/asm] x86/asm/entry/32: Improve a TOP_OF_KERNEL_STACK_PADDING comment Git-Commit-ID: ff8287f36381deff729aa4e7b02296a080519fd0 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: ff8287f36381deff729aa4e7b02296a080519fd0 Gitweb: http://git.kernel.org/tip/ff8287f36381deff729aa4e7b02296a080519fd0 Author: Andy Lutomirski AuthorDate: Thu, 2 Apr 2015 12:41:44 -0700 Committer: Ingo Molnar 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 Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/41fee7bb8490ae840fe7ef2699f9c2feb932e729.1428002830.git.luto@kernel.org Signed-off-by: Ingo Molnar --- 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