Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp455848imi; Fri, 22 Jul 2022 02:46:26 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v2Rv62BNLrtcn8IW3IqEt9xct/ojjbWPmnQ1r9AvjEL49WHVwx3z0ZYvqL+NJx/3Rkjowu X-Received: by 2002:a17:90b:4f85:b0:1f0:95d:c02b with SMTP id qe5-20020a17090b4f8500b001f0095dc02bmr16187326pjb.89.1658483186243; Fri, 22 Jul 2022 02:46:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658483186; cv=none; d=google.com; s=arc-20160816; b=ywBjt6lPHAhUAJe6X7XlG79JPFmiO3VjLfrGBW82go4uiU8qGPUSzysCdJvaU87UfF khspS6WLTI7GdO8YjHPQs+W43YLA8OF9E7xAQC3vt50LMEQo0M6X8kLE+Mo7+AoR9gEE QHy9XuF4NFt4BvewZehp/IzLKukdx1yBBBESmfL0j+1xxm3IUT8YcxkF/eowitQ4E72F V1UyIj4ZqYhxgRFlo3LbpYtyRPTTVRH5rcsOH+cmnxW4jek+Y2twrN0CH80CJ0bZiu8z S30dIbO7myHVCcMQdGl7P1DD8tFkRedHp9x1ins6sUGjw8eX5PevkyFnUdTX/lE+F4DT YCEw== 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=g64b3VL/YPy6SBydK0LCcWW/MiCNZrNG/o3OIoxs8T8=; b=wiELbmvZugRMxgxHwCHy1ENJ7Fd3cvPHxpexBvoBItPZH/dMHP0Hi8HcCgkh8d3PE9 q0w/Tq5Jbs3fibijkSnstIOgpMNIVcTeCKXmE75oePBM3OGJPjvJr0DYp1vAekOGZXyL vYZRBWjPUtdMVrfEotfnTKlWZ+50o2aVvrEZsm/jwTuZd72mcO1l+Ju70p/X3vFcLzQW nSGgM2wdd4BIGYHr71U6PU6SEaJehSirb+GSAHQZQ/r7knfd/62yloz+l84A0RQQrd5B 8brtfi93VLaKO8Nz4aaek62/Y7Pb0luPl3uGmXAw/HKnTG8mIKa1+h1b6/FN4g5nq9NY D9uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fPGvNTrI; 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 e16-20020a170902ef5000b0016cd98eebc3si5161568plx.151.2022.07.22.02.46.11; Fri, 22 Jul 2022 02:46:26 -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=fPGvNTrI; 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 S235565AbiGVJR7 (ORCPT + 99 others); Fri, 22 Jul 2022 05:17:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235687AbiGVJRb (ORCPT ); Fri, 22 Jul 2022 05:17:31 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84149B8512; Fri, 22 Jul 2022 02:12:32 -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 A22D861F6A; Fri, 22 Jul 2022 09:12:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A480EC341C6; Fri, 22 Jul 2022 09:12:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658481151; bh=Wt+EB/dW/0u8BsAcTs5fV+lx/gIguU83xTSddMOXCJY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fPGvNTrIjgEBFUPPIacWJlokHwpKa9Bixk9PCH4YGp8hhZ7dMsB3W8PIvOueyqOjR eiFucSsTCs0TIyqJlcgws4NHgrr0e1j6Rc/NU8lAsWZKF4vBWNwL+96MWPT1Ci28uP cZcHiOl8/mzFN5ioa1vZEOi5lXR9IBPjSH2C9XCU= 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 Subject: [PATCH 5.15 13/89] x86/retpoline: Move the retpoline thunk declarations to nospec-branch.h Date: Fri, 22 Jul 2022 11:10:47 +0200 Message-Id: <20220722091134.116235762@linuxfoundation.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220722091133.320803732@linuxfoundation.org> References: <20220722091133.320803732@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.8 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 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: 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) {