Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp1368036imi; Sat, 23 Jul 2022 03:52:48 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uqH9rt4fku9tOLCH4QPpSNKUSkpwMHQ0sovDISWCsRjvoMFSt7dP9n1WQproF+V/K3Ln3+ X-Received: by 2002:a17:902:d3cb:b0:16c:bbfe:3513 with SMTP id w11-20020a170902d3cb00b0016cbbfe3513mr4011065plb.17.1658573568088; Sat, 23 Jul 2022 03:52:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658573568; cv=none; d=google.com; s=arc-20160816; b=QY/0XdFnvyjZeQ51cEcupqYQdpybfSsCbeu4+u6FZiBnGPPTv2J697bwJz0lkskm7q 1o8+UqYHG0hdSTL/7K7FUIAMCWABMImxwzWKJYhsUM5BdAha9zwxj+lo8sEdbWWNIBdn AhctbYaw6N6Xz9OTO8FYZKns5b4+xvSCY344jLCqZiqTlDBzokiv3sVTp3qIcY6XItGy zHMzT43MIHdIW1OVBisEy1S0P6f5XVKX9i0gHYppHc3ddh18qCDp9gkQKCc+gZ+H4RwK aoJ8Y5OKK1a/jY/qJ0oezoCmk4GLECWewrLKtyzdXmCXxTGLUqEc1hLEAlCqyPAhguHT L2Gw== 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=Pm7dYCHnD/CgCZAoNf5Tl4lCdFBC8isYjBFDGFDYkp/EodiKEbncCU2P42imvkXeg4 aIkh3i4CgIeDoQQLjiJizBW26W3cdS3llCMvJVIgVAuBz9HF/b/+Vtj2ZZOXcNtvmCX8 KXLznphaT6/2z/JNgCaNwSpCbV9WPq4kFuosokJTeFdeceRbLmUjlWg2Hoxrm7wgLMc8 2vEHadpGf+v48LEJ69WBTRBGpqzIzolzYrN0MJhGWaZEiKA4zVyBCJS6Xhd6Xxynz5hb I+7TcZL1jgIgDjoZe1RRsuBVJtW6fP1qnLvfGCGSeFyy8W2jzOID1apXdKyJfSBj/35B fxyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wF2IMf2T; 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 o11-20020a056a0015cb00b005251e17bcb2si9789033pfu.254.2022.07.23.03.52.33; Sat, 23 Jul 2022 03:52:48 -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=wF2IMf2T; 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 S238134AbiGWKCy (ORCPT + 99 others); Sat, 23 Jul 2022 06:02:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238054AbiGWKCW (ORCPT ); Sat, 23 Jul 2022 06:02:22 -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 5969181B3E; Sat, 23 Jul 2022 02:59:02 -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 B614B61240; Sat, 23 Jul 2022 09:59:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BC5B6C341C0; Sat, 23 Jul 2022 09:59:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658570341; bh=UJTwM9IbOrqoHdkWkc3PKEHG1lSMjA/Rmh5gdrCnikc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wF2IMf2TWyol6RkRGe4cOhVYFBanpc0LGnyJ5cGYnrGu2y2e0VhFArS6oP1WIX4FY kT/FKUohAG+VBd0nJWJPNQlX+q94YV7RGN4TMV7fgq6l2OOx9UfA/93Qd88mq12Zro WWtniH9eEjDE17n0LQcCiXb4sMbs51L+bsk6JUGI= 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/148] x86/retpoline: Move the retpoline thunk declarations to nospec-branch.h Date: Sat, 23 Jul 2022 11:54:25 +0200 Message-Id: <20220723095239.143471969@linuxfoundation.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220723095224.302504400@linuxfoundation.org> References: <20220723095224.302504400@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: 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) {