Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp758378pxp; Fri, 11 Mar 2022 14:20:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJwCXCpZwPx1toUYSr+zilaZJFxmqlXVbEL1rhslBBpJH4jNwyssOikN+BnImlOo2D25YWvb X-Received: by 2002:a17:90a:a418:b0:1bf:2e8f:f0f5 with SMTP id y24-20020a17090aa41800b001bf2e8ff0f5mr12845188pjp.59.1647037251906; Fri, 11 Mar 2022 14:20:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1647037251; cv=none; d=google.com; s=arc-20160816; b=rsVdMQlrcRGlT46rilPpbAvZRvTsxV3RA7lkkNEAZfZmRhUR1bl3txb1ijmfCd26ff TfhFKKULru/TAsMnKSeiOhHkKbxeFrDiHd+vQWGvnr+47Z5NGhQ1RkSM32aXBTWaBodi JFxiPvEiLrM+YlKYvOgX8x27auKfcVO7hVh7siVq7JcdPNNp0nXs81PVvZP3LAXho0bF GwbFOPm3WGtuOKtnoNAihpl+CccP1mVeQ1wiBU/y9hxekicFDjI4fLQfsPmMl8qsPBUL 7D+xXmN5uzyogRc27z63oLjeLplGnQ7VpVkuVHEuqhrp1v8D6l3ZhpxKLk9tOsHAu1+6 xxSA== 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=Xsy7No/lXWtcZ/ADBRkImDV2dItktGcyyD1X1gf5BMDDqbmJjBw937m3RIXBfKmpHw uAwj2cURktDunvz8V9su6YshHr/TNHFgAzpEKajrI0dxVPEEdxUB3BKJaQOCI+TtE8ea ALWl5QBDiVj2oOlih1U4n63O3ltZYkgQcbsHvs329vGdj2pYBltFP5hCCjoGW54OYGeT RxDu+ZCjvPyHV3eus5vPrN4CylezwuNpTOEiJf3K6ouQFBzuntD8CqW9kK8y17CIJoP/ A8/cP0einHPFgtJjLX+w552H++Eurnynl9fttejmr/TmbtvIA0EIHZsqNAyEVJxsAhAD Aedg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=BLcbdbDg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id z10-20020a63b90a000000b0037604b9b278si8801839pge.572.2022.03.11.14.20.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Mar 2022 14:20:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=BLcbdbDg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 28FC52A1645; Fri, 11 Mar 2022 13:35:04 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242993AbiCJONj (ORCPT + 99 others); Thu, 10 Mar 2022 09:13:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242849AbiCJOMz (ORCPT ); Thu, 10 Mar 2022 09:12:55 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FB3715679E; Thu, 10 Mar 2022 06:11:12 -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 ams.source.kernel.org (Postfix) with ESMTPS id 0612EB8267B; Thu, 10 Mar 2022 14:11:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 396CEC340E8; Thu, 10 Mar 2022 14:11:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1646921463; bh=BQM6yHpMDK0Tpuk2e3Gr783l4lRRVOUjiG3mBdAMFjw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BLcbdbDgqx9WLjEwex2qRFtehGEMqWMQmQCPNfho0QtbhJk7bAvpH+moK2L2otcZn +faVPBQVtAuU35u9OJl+kvIFmuof0FHeYEWOQ6LELPEqPfcxgEwkDTU0OB3+Ivy5Sh RW77uWmMXLRGtZC/DGAnWjnqpHa9VNVJxkHeMaAA= 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.16 25/53] arm64: entry: Move trampoline macros out of ifdefd section Date: Thu, 10 Mar 2022 15:09:30 +0100 Message-Id: <20220310140812.559049505@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220310140811.832630727@linuxfoundation.org> References: <20220310140811.832630727@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=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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