From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751384AbdFAFod (ORCPT ); Thu, 1 Jun 2017 01:44:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40158 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751348AbdFAFo2 (ORCPT ); Thu, 1 Jun 2017 01:44:28 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 30B64C059722 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jpoimboe@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 30B64C059722 From: Josh Poimboeuf To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, Linus Torvalds , Andy Lutomirski , Jiri Slaby , Ingo Molnar , "H. Peter Anvin" , Peter Zijlstra Subject: [RFC PATCH 07/10] x86/asm: add CFI hint annotations to sync_core() Date: Thu, 1 Jun 2017 00:44:13 -0500 Message-Id: In-Reply-To: References: X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 01 Jun 2017 05:44:28 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This enables the unwinder to grok the iret in the middle of a C function. Signed-off-by: Josh Poimboeuf --- 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 3cada99..9b90129 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 @@ -676,6 +677,7 @@ static inline void sync_core(void) unsigned int tmp; asm volatile ( + CFI_SAVE "mov %%ss, %0\n\t" "pushq %q0\n\t" "pushq %%rsp\n\t" @@ -685,6 +687,7 @@ static inline void sync_core(void) "pushq %q0\n\t" "pushq $1f\n\t" "iretq\n\t" + CFI_RESTORE "1:" : "=&r" (tmp), "+r" (__sp) : : "cc", "memory"); #endif -- 2.7.4