Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp592908pxp; Wed, 9 Mar 2022 08:45:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJwQs4DjjZUOggzGv739H9qwJjS6RAo519EyEQl6lL+bQu0rZAf1QtYqAEHIUETUSqiwzmln X-Received: by 2002:a17:907:62a9:b0:6da:7953:4df0 with SMTP id nd41-20020a17090762a900b006da79534df0mr605284ejc.316.1646844308725; Wed, 09 Mar 2022 08:45:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646844308; cv=none; d=google.com; s=arc-20160816; b=prJ7EIe4EhDWlXomniD03gRsbRakSbxLBAO1tvld+z3IPIJwTmrbBtwnCjnW2TYFd0 g9o68aDv68de1qTeRTJh4WCOTbL7eah8dD7QPqLK2OB5128L3hOjNhSzG+suUMjxBvYy vxCFkFRONdVL5dgNry6AZosjqIAiNn2nTcGRZP3QqAqWy7HHbdmV6U5jr5J0i7iCXaLd /GhCqgmNVSEo+UnZkV1irzeIMoOsDqB2tTNT4o06+nFQOqMyqQwqdRgKvXxQ38oWI+Jx +za26L5Jkc9PaVy4c7MMsHLBaIqgNWoYfIlVH2Fjn0qmMoFZPc2i1GYJ0AfQW82QDfyE NbWQ== 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=8VnBPwVGdh8xlwgV1pNTurENoS7SRG9rAcAtSsRxDJ8=; b=ShZxzsjlIpa5tBPe/t34wouRiYNR6AAeC4n4ZBfiK+GhgeJ6Y/bloxpwLOL4m7TYXd ZTRMKzObOMckU6e8QGJn+w4WvmoG5P8qY79CPzTJfjDQy6n7jUFB6mdJx+a0vCaRiCpQ Kw3X2KHMhjF4FUGGeUEYc2GpTNzAFdTJL6CRAe9mUefGXsffat877W8y/0y+8NET3IC9 ees3d7Us4N7pOVA00BYiW5XM700FpeBKW/NBYbM6bvazGJ0rT3g+232Xpb7UO/65tJBB 00cz0MT7gJE+u2nmpnnHgrAHRLILh7yCtlwrlTd6JBCVg3Fn+b5Blg+/c+SssaAOcqDm 3YAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=l1a1RY+a; 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 j8-20020aa7c0c8000000b00416a3194925si620212edp.416.2022.03.09.08.44.45; Wed, 09 Mar 2022 08:45:08 -0800 (PST) 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=l1a1RY+a; 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 S236505AbiCIQTe (ORCPT + 99 others); Wed, 9 Mar 2022 11:19:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236195AbiCIQJl (ORCPT ); Wed, 9 Mar 2022 11:09:41 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C56AFB6D27; Wed, 9 Mar 2022 08:08:07 -0800 (PST) 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 610E561644; Wed, 9 Mar 2022 16:08:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6E9E1C340E8; Wed, 9 Mar 2022 16:08:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1646842086; bh=BQM6yHpMDK0Tpuk2e3Gr783l4lRRVOUjiG3mBdAMFjw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l1a1RY+a16Wo1yK915I/4EWlhJIpz482WFiUMC/uVVEf4IALuEhlNEUhGXtDh+msQ BuRWn/Y1LiHoUlIe/xIaFz6YoX586VoidR9EJU3HNDWnnXolEstEFBGISxF51iURbt /5C77FI380KkBAOT+xQbtTwstKYWaEUzpzDymqVA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Russell King (Oracle)" , Catalin Marinas , James Morse Subject: [PATCH 5.15 29/43] arm64: entry: Move trampoline macros out of ifdefd section Date: Wed, 9 Mar 2022 17:00:13 +0100 Message-Id: <20220309155900.579232688@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220309155859.734715884@linuxfoundation.org> References: <20220309155859.734715884@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.6 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: James Morse commit 13d7a08352a83ef2252aeb464a5e08dfc06b5dfd upstream. The macros for building the kpti trampoline are all behind CONFIG_UNMAP_KERNEL_AT_EL0, and in a region that outputs to the .entry.tramp.text section. Move the macros out so they can be used to generate other kinds of trampoline. Only the symbols need to be guarded by CONFIG_UNMAP_KERNEL_AT_EL0 and appear in the .entry.tramp.text section. Reviewed-by: Russell King (Oracle) Reviewed-by: Catalin Marinas Signed-off-by: James Morse Signed-off-by: Greg Kroah-Hartman --- arch/arm64/kernel/entry.S | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -608,12 +608,6 @@ SYM_CODE_END(ret_to_user) .popsection // .entry.text -#ifdef CONFIG_UNMAP_KERNEL_AT_EL0 -/* - * Exception vectors trampoline. - */ - .pushsection ".entry.tramp.text", "ax" - // Move from tramp_pg_dir to swapper_pg_dir .macro tramp_map_kernel, tmp mrs \tmp, ttbr1_el1 @@ -709,6 +703,11 @@ alternative_else_nop_endif .endr .endm +#ifdef CONFIG_UNMAP_KERNEL_AT_EL0 +/* + * Exception vectors trampoline. + */ + .pushsection ".entry.tramp.text", "ax" .align 11 SYM_CODE_START_NOALIGN(tramp_vectors) generate_tramp_vector