Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751607AbdGRKta (ORCPT ); Tue, 18 Jul 2017 06:49:30 -0400 Received: from terminus.zytor.com ([65.50.211.136]:50703 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751388AbdGRKt2 (ORCPT ); Tue, 18 Jul 2017 06:49:28 -0400 Date: Tue, 18 Jul 2017 03:43:46 -0700 From: tip-bot for Josh Poimboeuf Message-ID: Cc: brgerst@gmail.com, torvalds@linux-foundation.org, jpoimboe@redhat.com, efault@gmx.de, tglx@linutronix.de, dvlasenk@redhat.com, bp@alien8.de, mingo@kernel.org, linux-kernel@vger.kernel.org, luto@kernel.org, hpa@zytor.com, jslaby@suse.cz, peterz@infradead.org Reply-To: luto@kernel.org, linux-kernel@vger.kernel.org, mingo@kernel.org, hpa@zytor.com, peterz@infradead.org, jslaby@suse.cz, brgerst@gmail.com, jpoimboe@redhat.com, efault@gmx.de, torvalds@linux-foundation.org, bp@alien8.de, dvlasenk@redhat.com, tglx@linutronix.de In-Reply-To: References: To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/asm] x86/asm: Add unwind hint annotations to sync_core() Git-Commit-ID: 76846bf3cb09e98881cb4908385a0e899716b01f 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 Content-Length: 1909 Lines: 57 Commit-ID: 76846bf3cb09e98881cb4908385a0e899716b01f Gitweb: http://git.kernel.org/tip/76846bf3cb09e98881cb4908385a0e899716b01f Author: Josh Poimboeuf AuthorDate: Tue, 11 Jul 2017 10:33:45 -0500 Committer: Ingo Molnar CommitDate: Tue, 18 Jul 2017 10:57:44 +0200 x86/asm: Add unwind hint annotations to sync_core() This enables objtool to grok the iret in the middle of a C function. Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jiri Slaby Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: live-patching@vger.kernel.org Link: http://lkml.kernel.org/r/b057be26193c11d2ed3337b2107bc7adcba42c99.1499786555.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar --- arch/x86/include/asm/processor.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index 6a79547..b27dc9b 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h @@ -22,6 +22,7 @@ struct vm86; #include #include #include +#include #include #include @@ -684,6 +685,7 @@ static inline void sync_core(void) unsigned int tmp; asm volatile ( + UNWIND_HINT_SAVE "mov %%ss, %0\n\t" "pushq %q0\n\t" "pushq %%rsp\n\t" @@ -693,6 +695,7 @@ static inline void sync_core(void) "pushq %q0\n\t" "pushq $1f\n\t" "iretq\n\t" + UNWIND_HINT_RESTORE "1:" : "=&r" (tmp), "+r" (__sp) : : "cc", "memory"); #endif