Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4696502imw; Tue, 12 Jul 2022 12:37:14 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tbxsp2NzVui6LrHkwPfg9CKYE+nfHr6sp1ZR1r8SGc0J5c9cUhWcMEF1yZkYZsS6THKebk X-Received: by 2002:a17:907:761c:b0:6d6:e553:7bd1 with SMTP id jx28-20020a170907761c00b006d6e5537bd1mr25907775ejc.5.1657654633930; Tue, 12 Jul 2022 12:37:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657654633; cv=none; d=google.com; s=arc-20160816; b=a3TyefJt51FbKksI0kPP0Ckft3LYPXoxviwvbcgKIdpkbY6ogO0vBYD8epm0IaB6Gt vW+BA07FglD1020rxlz6h2aYMwZ683MckL2+OxfSxELEMVpAW4zpNc+4zE16EabiVkdE 5VzJDkZUJrdJsi4suhruiEWaB6NwK/ldrD/ejZhNKXVAuNb6ATWHptkClGYZK+t+lPvA SSS1iO6y/V1GHDd5laERjNkuIfXHDEGtXjf5nkwIOSP6ZG/Qo7Npt3F2/g8011bffHQT fLu37mox8me+a9eVEnSASthCWnM7w/C1GzA7h5z0ndRFFPZE36Z849jNdGF+bSLFHHUv vgzg== 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=JYT+WCsOSHtl8PNkxz1mR4lsGtZSe89XL03xUE+bDFg=; b=RM7ORJleB/8NkhTrKpBm20MSueHNpj6Xvzd6c45uaPEJB3aBdb2tSQW06FFvLL6rWl KCIJe3sz/+ekbHghmyJf+c5QIzZabLEhxOa8OTSSGYrT+0Zmdv5fm/kpcPjQ8DaU9Elj uCtYZV3apV5MsYJV/3fhK9icK2kR4rMVkeqFjBxZtbWjZ+TXtnAwi3aH8vT+C+UkH0e5 qSUOinYZXn9rgSjylJfhd/baEoqzFaivXSwq73MOozoj4/j/DbFeXGgdtdBg0N54X3WI UjZTBBSnzQn1Zj5ydC0YxU8z5bN4Ph+74eO5sf1oAbSLZpV/B9gPds8h9upyKSqEIrld c9Ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2F21fH6V; 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 oz9-20020a1709077d8900b006f38560fe61si1980672ejc.94.2022.07.12.12.36.48; Tue, 12 Jul 2022 12:37:13 -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=2F21fH6V; 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 S233825AbiGLSps (ORCPT + 99 others); Tue, 12 Jul 2022 14:45:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233412AbiGLSpO (ORCPT ); Tue, 12 Jul 2022 14:45:14 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A94ED7B9D; Tue, 12 Jul 2022 11:42:30 -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 1DBE861ACC; Tue, 12 Jul 2022 18:42:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CF888C3411C; Tue, 12 Jul 2022 18:42:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1657651349; bh=nHVd6Mwvbhq8aggXi24Iyi/JP3pj3Tu3p2pzPUSotaM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2F21fH6VFkkEBO5yFhKFnd2Y3PWSiDBowHD0BZJMZs/E+TtsEJgyPLu5muJeN0loJ DxalhcLGILOKNVJOv4ioZYHbOdBo6WW2pmxuqNMFEO69JF3bQbKCeSPrEqXen8OTPo CKC18RQAc5XGCke6LF6vfs5h35XnTUCkBXPEuUaY= 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 050/130] x86/retpoline: Remove unused replacement symbols Date: Tue, 12 Jul 2022 20:38:16 +0200 Message-Id: <20220712183248.743655363@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 4fe79e710d9574a14993f8b4e16b7252da72d5e8 upstream. Now that objtool no longer creates alternatives, these replacement symbols are no longer needed, remove them. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Borislav Petkov Acked-by: Josh Poimboeuf Tested-by: Alexei Starovoitov Link: https://lore.kernel.org/r/20211026120309.915051744@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 | 10 -------- arch/x86/lib/retpoline.S | 42 ---------------------------------- 2 files changed, 52 deletions(-) --- a/arch/x86/include/asm/asm-prototypes.h +++ b/arch/x86/include/asm/asm-prototypes.h @@ -24,14 +24,4 @@ extern void cmpxchg8b_emu(void); extern asmlinkage void __x86_indirect_thunk_ ## reg (void); #include -#undef GEN -#define GEN(reg) \ - extern asmlinkage void __x86_indirect_alt_call_ ## reg (void); -#include - -#undef GEN -#define GEN(reg) \ - extern asmlinkage void __x86_indirect_alt_jmp_ ## reg (void); -#include - #endif /* CONFIG_RETPOLINE */ --- a/arch/x86/lib/retpoline.S +++ b/arch/x86/lib/retpoline.S @@ -41,36 +41,6 @@ SYM_FUNC_END(__x86_indirect_thunk_\reg) .endm /* - * This generates .altinstr_replacement symbols for use by objtool. They, - * however, must not actually live in .altinstr_replacement since that will be - * discarded after init, but module alternatives will also reference these - * symbols. - * - * Their names matches the "__x86_indirect_" prefix to mark them as retpolines. - */ -.macro ALT_THUNK reg - - .align 1 - -SYM_FUNC_START_NOALIGN(__x86_indirect_alt_call_\reg) - ANNOTATE_RETPOLINE_SAFE -1: call *%\reg -2: .skip 5-(2b-1b), 0x90 -SYM_FUNC_END(__x86_indirect_alt_call_\reg) - -STACK_FRAME_NON_STANDARD(__x86_indirect_alt_call_\reg) - -SYM_FUNC_START_NOALIGN(__x86_indirect_alt_jmp_\reg) - ANNOTATE_RETPOLINE_SAFE -1: jmp *%\reg -2: .skip 5-(2b-1b), 0x90 -SYM_FUNC_END(__x86_indirect_alt_jmp_\reg) - -STACK_FRAME_NON_STANDARD(__x86_indirect_alt_jmp_\reg) - -.endm - -/* * Despite being an assembler file we can't just use .irp here * because __KSYM_DEPS__ only uses the C preprocessor and would * only see one instance of "__x86_indirect_thunk_\reg" rather @@ -92,15 +62,3 @@ STACK_FRAME_NON_STANDARD(__x86_indirect_ #undef GEN #define GEN(reg) EXPORT_THUNK(reg) #include - -#undef GEN -#define GEN(reg) ALT_THUNK reg -#include - -#undef GEN -#define GEN(reg) __EXPORT_THUNK(__x86_indirect_alt_call_ ## reg) -#include - -#undef GEN -#define GEN(reg) __EXPORT_THUNK(__x86_indirect_alt_jmp_ ## reg) -#include