Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp459549imi; Fri, 22 Jul 2022 02:51:57 -0700 (PDT) X-Google-Smtp-Source: AGRyM1scveri5kDtjCkbswru/AAUwmD1CeosMenxAsFSHNPsZJ2uHx+RQog/mAJ4aVJYqK51sCQL X-Received: by 2002:a17:902:e848:b0:16c:5639:eb4a with SMTP id t8-20020a170902e84800b0016c5639eb4amr2573241plg.146.1658483517395; Fri, 22 Jul 2022 02:51:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658483517; cv=none; d=google.com; s=arc-20160816; b=CJVPGAcm94ePUEULgC+ziyWjjZ+AaPDnBtxl1MSAljxBNT5w2/3Zg4AblhvksOzbNp boVTyd2pspCfD7egRw2Z5QVM1MvPdJx5ssWdIpRuSieyC+8VFlt6Eo1nBycsPMnllf4i 7k44vo/ti872PfBA/oqkfkueT4/pmjnkIUavlvjiFn+qteeZugyjAKtUvOicHVm9Iam7 GzzPvHOGyklrkUGYqAzr7l02IunDBSYc003gHcHiHdS0gdbru16WHM8KeD7w00IiFJr2 hIWySJk/GslFwiUsnf2jT3SqZvciAr6IK1IT+dqvKKJLtOPS/qgZQ8uW3AlPof/yulT3 iIvw== 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=CPqUlAEITnaCYRij0YC/NyN57lGzL8oeoUzHFTueGcA=; b=WzIW4nc9x60Cz+ESCIbAZbn3i5PApluRc4Od3n0Cf/ascrSJumJ7r7Dryg4o7BUfiK CnfB3vbpcmA3uKeyqHg/v5ZKGetvTYSPksv10QpinPjyxTqwZfUTig2/Lu/5gpxcBehd uONd4GENE5c0rnetf89F2r0u1ILf9dchnJk89PAYSee9pM/2+pOXlqGHZxX/QgC9tSzZ a4BFEd0fewHib5TNXvN1cpRIc3z8h323vwJhY7/8gsQ74lWg5vEFnaVqPqd8EPDPIJ1d HD46qKknclXBU4p7Ua2OZ9F+uwUNRM6lhKURhv4HL43XuA2cqIBUovi04OpyYp7x61Zc sNMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=BTdBPnLt; 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 u16-20020a17090341d000b0016c116a940csi3313480ple.495.2022.07.22.02.51.42; Fri, 22 Jul 2022 02:51:57 -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=BTdBPnLt; 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 S235807AbiGVJRf (ORCPT + 99 others); Fri, 22 Jul 2022 05:17:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235755AbiGVJRV (ORCPT ); Fri, 22 Jul 2022 05:17:21 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79065B5C8F; Fri, 22 Jul 2022 02:12:23 -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 B5CA561F4F; Fri, 22 Jul 2022 09:12:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BD42AC341C6; Fri, 22 Jul 2022 09:12:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658481142; bh=ddghRq3UuZwjfdqG04lrwv2NjgZopcv5DfxDD/Hw6+s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BTdBPnLt7iaTJ29JuHADAOkfn7YIcC3ydS6l8fEY5uYPQVEF+BZLCl+dz9+hz5U4w EFWRf2QbwrIa5dfPQmzD/SRN/MNo/v5ObWJ+SPLRwXY91Pmdr3drwth4BgPGtuVD6O 4KePemwlIhDw/jdQ47k5w8kWBoKzVlcFc1JnY3J0= 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 10/89] x86/retpoline: Remove unused replacement symbols Date: Fri, 22 Jul 2022 11:10:44 +0200 Message-Id: <20220722091133.950432393@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 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: 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