Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4696885imw; Tue, 12 Jul 2022 12:37:40 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vjR0n13XRE8HyrHli6CffxsXgbaJgduYe0TeuiDNqRwLDE4W/QrzfsN0GAJANeXF2Ke0Qx X-Received: by 2002:a17:907:97c8:b0:72b:1cc7:3c4d with SMTP id js8-20020a17090797c800b0072b1cc73c4dmr25146854ejc.217.1657654660374; Tue, 12 Jul 2022 12:37:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657654660; cv=none; d=google.com; s=arc-20160816; b=ycPMABe5XYtDIn4LunkkqlCHlclaLC1ktauWZFyNogAvacnmy1B4z0kFskgFrkRKHI kCe5qdNSpHcwzuMKcnwE/htZ4ETsbkj+s+AzAYA0Mim9ulAqUuh3/8K059X7P6u6fTzL AP2AY0YuiyHYyLMICcuYAY1wYyciDrTlnpAkUuDdIkRUm1VtxpJMaXUZZfHL9TXol962 /YGYrQnaRb8utk0lxzQuBXG5gQGayXtGxISv78RW/ea7CYzmUa98KrBFumlgz9dleJE6 v7tEf9QOYiBFzHnEjjJTcm0gRpNh5fTA+9QI4vDDCO9Z2iryD1Fs86E8E5at8wd+xyQ/ WPxA== 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=X38mIVG97X/xfguYo/CJWmj1QP9udPxcaxPBMUAV8YRwlPtq3PZBOKho91gj9R2AQn Sz0N1zYuVoYRioG+a9klitaIPj84ZcUC5BZg/FvD3sXYV4/w2/rvXgZeR1mYMlWmja+v Rysb3/pvBb4shc6FgOCyqo6GS85tmM9FHvn4AAg20y1MteAHCB9ghgMjEYmrEN/oZZWx RlYAlu1IZ9nzyLNogtgn7cEmtlsGrxN6Ns4UUjYoNc4Sh5GgZRL8xxX6aso+Oj6xo77Q n5PADm6RcNL6OmBL4+Q3NaGVUnH33d0PHh6ROHCrqM2yoOpYFZ6ui9MFntw0MUXLPh94 hy4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=D0o1pqc4; 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 dd6-20020a1709069b8600b0071d3b6e50fbsi16048425ejc.402.2022.07.12.12.37.14; Tue, 12 Jul 2022 12:37:40 -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=D0o1pqc4; 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 S235347AbiGLTCy (ORCPT + 99 others); Tue, 12 Jul 2022 15:02:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235251AbiGLTBo (ORCPT ); Tue, 12 Jul 2022 15:01:44 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E041AC26; Tue, 12 Jul 2022 11:49:10 -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 ams.source.kernel.org (Postfix) with ESMTPS id 93CF5B81B95; Tue, 12 Jul 2022 18:49:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DD989C3411C; Tue, 12 Jul 2022 18:49:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1657651748; bh=Wt+EB/dW/0u8BsAcTs5fV+lx/gIguU83xTSddMOXCJY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D0o1pqc48EoUHmW29RuOyxh8bCcSBlLK+0WrY5k4ROcrqWR39ClodvBppeSNJkHzm aGgOkcfvRmuzmTRfg4WrUWojUaUr2/AjfhqwBXTOr03kjtQUfZ/if+3unZki59fREG 2Ke+F+M56oTfFR/v1PjPmxebWtUeDqv1pdKAGHQs= 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/78] x86/retpoline: Move the retpoline thunk declarations to nospec-branch.h Date: Tue, 12 Jul 2022 20:38:43 +0200 Message-Id: <20220712183239.375050789@linuxfoundation.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220712183238.844813653@linuxfoundation.org> References: <20220712183238.844813653@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: 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) {