From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754907AbeBURDp (ORCPT ); Wed, 21 Feb 2018 12:03:45 -0500 Received: from terminus.zytor.com ([198.137.202.136]:44437 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751771AbeBURDm (ORCPT ); Wed, 21 Feb 2018 12:03:42 -0500 Date: Wed, 21 Feb 2018 09:03:08 -0800 From: tip-bot for Josh Poimboeuf Message-ID: Cc: linux-kernel@vger.kernel.org, mingo@kernel.org, tglx@linutronix.de, luto@kernel.org, torvalds@linux-foundation.org, brgerst@gmail.com, jpoimboe@redhat.com, linux@dominikbrodowski.net, dan.j.williams@intel.com, hpa@zytor.com, peterz@infradead.org Reply-To: linux-kernel@vger.kernel.org, mingo@kernel.org, luto@kernel.org, tglx@linutronix.de, jpoimboe@redhat.com, torvalds@linux-foundation.org, brgerst@gmail.com, dan.j.williams@intel.com, linux@dominikbrodowski.net, hpa@zytor.com, peterz@infradead.org In-Reply-To: <20180221024214.lhl5jfgw33c4vz3m@treble> References: <20180221024214.lhl5jfgw33c4vz3m@treble> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/pti] x86/entry/64: Simplify ENCODE_FRAME_POINTER Git-Commit-ID: 0ca7d5baa1787e5f2a7abd6bfca3303b1bbb48ac 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: 0ca7d5baa1787e5f2a7abd6bfca3303b1bbb48ac Gitweb: https://git.kernel.org/tip/0ca7d5baa1787e5f2a7abd6bfca3303b1bbb48ac Author: Josh Poimboeuf AuthorDate: Tue, 20 Feb 2018 20:42:14 -0600 Committer: Ingo Molnar CommitDate: Wed, 21 Feb 2018 16:54:07 +0100 x86/entry/64: Simplify ENCODE_FRAME_POINTER On 64-bit, the stack pointer is always aligned on interrupt, so instead of setting the LSB of the pt_regs address, we can just add 1 to it. Suggested-by: Linus Torvalds Signed-off-by: Josh Poimboeuf Cc: Andrew Lutomirski Cc: Brian Gerst Cc: Dan Williams Cc: Dominik Brodowski Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180221024214.lhl5jfgw33c4vz3m@treble Signed-off-by: Ingo Molnar --- arch/x86/entry/calling.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/x86/entry/calling.h b/arch/x86/entry/calling.h index 5d10b7a..be63330 100644 --- a/arch/x86/entry/calling.h +++ b/arch/x86/entry/calling.h @@ -181,12 +181,7 @@ For 32-bit we have the following conventions - kernel is built with */ .macro ENCODE_FRAME_POINTER ptregs_offset=0 #ifdef CONFIG_FRAME_POINTER - .if \ptregs_offset - leaq \ptregs_offset(%rsp), %rbp - .else - mov %rsp, %rbp - .endif - orq $0x1, %rbp + leaq 1+\ptregs_offset(%rsp), %rbp #endif .endm