From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E43BC433F5 for ; Fri, 29 Oct 2021 08:03:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 79E8F610D2 for ; Fri, 29 Oct 2021 08:03:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232495AbhJ2IFo (ORCPT ); Fri, 29 Oct 2021 04:05:44 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:53222 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232365AbhJ2IFb (ORCPT ); Fri, 29 Oct 2021 04:05:31 -0400 Date: Fri, 29 Oct 2021 08:03:01 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1635494582; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9IQD51XgUhEKoef9st4DeRUqD9cvJlycFc8JKm/RssQ=; b=sEdnSZEaAjk9gahsyC5n/2qYfNDNTEs8lMBIed25mcUbnQrsgGjpP8epHx4M1PTmQUfMeb uyIOv17q1zbGr1HInwUSdYjdVwOg7qSqLuf7QM5HkSJ0IO70/vcSuBxCuhD7mMryRDyeeg 7s+iYyHklUIsgqFE0WsYWEVGuOAcmJtITG22qlq96IeKeBLiHCp4kNy2Nr/aQklW1j9P19 Ztabo+yOpwqUukumxS9iP11JspHE5Yo3IWCwo75sQc+JByocqdwqjFsGiEMIgl3bjr+QvT bRoqeNHLHQEryI4756ZjLLaVek4i1F+L36R30IIomHnpzIIVso8I1p+VkM3d+w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1635494582; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9IQD51XgUhEKoef9st4DeRUqD9cvJlycFc8JKm/RssQ=; b=DXTsKKUQk1+djmjqARBCZjHtwparhfFo3bKGAQ7A/1JsqqPG9JehwmPm04VqFtwYsLOZRH /9iuikH0tEz3QsCQ== From: "tip-bot2 for Peter Zijlstra" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: objtool/core] x86/retpoline: Move the retpoline thunk declarations to nospec-branch.h Cc: "Peter Zijlstra (Intel)" , Borislav Petkov , Josh Poimboeuf , Alexei Starovoitov , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20211026120310.106290934@infradead.org> References: <20211026120310.106290934@infradead.org> MIME-Version: 1.0 Message-ID: <163549458126.626.7413157081176375908.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the objtool/core branch of tip: Commit-ID: 6fda8a38865607db739be3e567a2387376222dbd Gitweb: https://git.kernel.org/tip/6fda8a38865607db739be3e567a2387376222dbd Author: Peter Zijlstra AuthorDate: Tue, 26 Oct 2021 14:01:40 +02:00 Committer: Peter Zijlstra CommitterDate: Thu, 28 Oct 2021 23:25:27 +02:00 x86/retpoline: Move the retpoline thunk declarations to nospec-branch.h Because it makes no sense to split the retpoline gunk over multiple headers. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Borislav Petkov Acked-by: Josh Poimboeuf Tested-by: Alexei Starovoitov Link: https://lore.kernel.org/r/20211026120310.106290934@infradead.org --- arch/x86/include/asm/asm-prototypes.h | 8 -------- arch/x86/include/asm/nospec-branch.h | 7 +++++++ arch/x86/net/bpf_jit_comp.c | 1 - 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/arch/x86/include/asm/asm-prototypes.h b/arch/x86/include/asm/asm-prototypes.h index a2bed09..8f80de6 100644 --- a/arch/x86/include/asm/asm-prototypes.h +++ b/arch/x86/include/asm/asm-prototypes.h @@ -17,11 +17,3 @@ extern void cmpxchg8b_emu(void); #endif -#ifdef CONFIG_RETPOLINE - -#define GEN(reg) \ - extern asmlinkage void __x86_indirect_thunk_ ## reg (void); -#include -#undef GEN - -#endif /* CONFIG_RETPOLINE */ diff --git a/arch/x86/include/asm/nospec-branch.h b/arch/x86/include/asm/nospec-branch.h index ec2d5c8..14053cd 100644 --- a/arch/x86/include/asm/nospec-branch.h +++ b/arch/x86/include/asm/nospec-branch.h @@ -5,6 +5,7 @@ #include #include +#include #include #include @@ -118,6 +119,12 @@ ".popsection\n\t" #ifdef CONFIG_RETPOLINE + +#define GEN(reg) \ + extern asmlinkage void __x86_indirect_thunk_ ## reg (void); +#include +#undef GEN + #ifdef CONFIG_X86_64 /* diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c index 9ea5738..7c03af6 100644 --- a/arch/x86/net/bpf_jit_comp.c +++ b/arch/x86/net/bpf_jit_comp.c @@ -15,7 +15,6 @@ #include #include #include -#include static u8 *emit_code(u8 *ptr, u32 bytes, unsigned int len) {