Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4699309imw; Tue, 12 Jul 2022 12:39:52 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uor+7pzIQFyjvceumAvxSma4bUawSoayTtXEEtgkLPuCkPEPUnhI+vdQCi4lwQfIPkeHQF X-Received: by 2002:a17:907:a056:b0:72b:1964:fbcc with SMTP id gz22-20020a170907a05600b0072b1964fbccmr26362264ejc.489.1657654792651; Tue, 12 Jul 2022 12:39:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657654792; cv=none; d=google.com; s=arc-20160816; b=T6c9xv1htQBRxQHTBvaQjvPpC7M1k8ZvtXExBHilwPYYU60Y0Cs4E17Pz5aAlSVLkZ aEdc3dtknsEu0Z6Ff7xx0klr5xatkQCLzYeIwKNkNmPLrcCqU31RMLkQhyVp43ASPzTO 13PoCgCcIAG79PEzIplPC7convD2bVYMg1qSd3ED/MtFT4pWbAkhGgw4Fie/6DNRFO17 vokEb7TxNkYtR3y5X2bUpMeVYpRTVJ4Chu0HrCbSb/jz/tgh53HAJ4kXT0d1ijU+EKno w6C7zONV/gyA8aJUrYrX8zNPwL+8PX6bPIOumQp491o7BjisxtU2z2jEaoaEbSpoNu+f gRSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=TZGmXqciEOa4fh3EJBwMF+raw3b9dNksjbpBeDlFsDc=; b=Xf5R42IubTk1aeVLwdCUX42vaTmDZG75FWXODr+XDOA2k7BhYNgafwanQz32/OeESt SDUs5klO0ytXp3EjqQ8XrU7f1FX5ijaiN5RORYWyrDDeRA/FHY3JT9190kv2vNEK1yYa AvJdmBBrGxogJXfqATc+SFJlpKP43/Hkr6wRf+BRBcO/nNTZrg+9C/xi7dsFTbYmO8cZ 6wFsf0m1qn78TvLElkuye9zKpLyEvaAEm8z9Z6EW/T7NN5fhX+HdPQSZPM5ciwi7zlgP P4WfqXRZyFentiEXStTSVKu1I7YPTbUrgzljidwe4x2QdNnfHEnSYmUujUwrMTwO1d9+ lZJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KshNpsiG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id eq9-20020a170907290900b007262b36f3e6si12095427ejc.772.2022.07.12.12.39.26; Tue, 12 Jul 2022 12:39:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KshNpsiG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234166AbiGLSqe (ORCPT + 99 others); Tue, 12 Jul 2022 14:46:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234358AbiGLSpp (ORCPT ); Tue, 12 Jul 2022 14:45:45 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D27E2DC18C; Tue, 12 Jul 2022 11:42:40 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 51E4661AC7; Tue, 12 Jul 2022 18:42:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1774BC3411E; Tue, 12 Jul 2022 18:42:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1657651359; bh=UJTwM9IbOrqoHdkWkc3PKEHG1lSMjA/Rmh5gdrCnikc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KshNpsiG4W2Q126gRCd5rMkpSfGddEO60p95GkS3sjLPSjM23OEfZ9gv8VuUZp+b6 4kyqjP6kRWSrEXOY9lYo4h4ukCspkvzQcNb0G+YH5aN6uAmIG/+MQsQVbFwRdemnhB 9cc7bgKsICouoEmCtGW5T/Dxb2syPbCQTWJE6kPY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Peter Zijlstra (Intel)" , Borislav Petkov , Josh Poimboeuf , Alexei Starovoitov , Thadeu Lima de Souza Cascardo , Ben Hutchings Subject: [PATCH 5.10 053/130] x86/retpoline: Move the retpoline thunk declarations to nospec-branch.h Date: Tue, 12 Jul 2022 20:38:19 +0200 Message-Id: <20220712183248.889104719@linuxfoundation.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220712183246.394947160@linuxfoundation.org> References: <20220712183246.394947160@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peter Zijlstra commit 6fda8a38865607db739be3e567a2387376222dbd upstream. 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 Signed-off-by: Thadeu Lima de Souza Cascardo Signed-off-by: Ben Hutchings Signed-off-by: Greg Kroah-Hartman --- 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(-) --- 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 */ --- 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 /* --- 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) {