Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1304319pxp; Thu, 17 Mar 2022 07:01:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPHOVQIgfSLJGrdSmOYmmV34Q5S0PcJRsmT2zBpFYQYsummso+6Ev+ZPpAy1rSJTOi73lU X-Received: by 2002:a05:6870:b417:b0:d4:547c:7a76 with SMTP id x23-20020a056870b41700b000d4547c7a76mr5170499oap.65.1647525664230; Thu, 17 Mar 2022 07:01:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647525664; cv=none; d=google.com; s=arc-20160816; b=Tc7Zgrca/JORwwpNfVllDpFeQK+UWvs3gbdHgQHttstyuKxU/aPgVRD1OREI9XHtql YhhtopowjhpqoQ+tEHqjtzRpjQgOVaIQWJ8R4G5ihR59St8M/hCL2C0IhnD/c040gAUg jBrhCdOh7OelSEQKcaEq7Cy9hQSxzcj5lVoqACI1lDYs8lNRbXl2ljvL71AEUoVq+2g3 WWn2sVP1zRMoo2pyhUMyk4qiqifTr5QpdidYRIegvA0zYLYJHIs3g3q3T6wZHCI3wtGP bWRJlDQz0ve4FM7Fot6CbQHHEnkysF/8QodSzxM0QbNPqEJSrkPEMQQMvK6BvuSDi5zh kSHQ== 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=MZTOd8C1D5QOZMly18EPGLHDq3HSV2g/C743xa/a4z4=; b=DcJcrwOm9SF0B1/akY2ks9bA5d4HR0mDfqLIhbYBsUUVu4R3LJIyZJPsRHGlSpw8it 5ZgHJ+OcpgHmzFuRB3R/YN9a9RPasJSXqBP6RwlL0L1lUKlOrwCx7lAFJ4rUWmlqE/Wc 1EnL6o18HOd50icqYh7GdkVAzE6DhCpf8XLrcvG+637naeK0TMek2tnYJL8t1K/Lp6rA I5Mu0ap2ffrLwIzsiTLqq+MYb3/kBO+oATRo8HK7LVFXQNuMQ4GzI8cmJkhtN1Ro3nMB d7RhLHLBBdIt5E/ROAovuQIfr/o9V8/wIC4jZRohHiCdK80yvKoCKTZZEaOF2uwWnMM4 UDmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=j2AwM+kU; 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 w4-20020a056830110400b005b23d7c16b4si1909355otq.78.2022.03.17.07.00.45; Thu, 17 Mar 2022 07:01:03 -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=j2AwM+kU; 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 S233718AbiCQMsR (ORCPT + 99 others); Thu, 17 Mar 2022 08:48:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233736AbiCQMsN (ORCPT ); Thu, 17 Mar 2022 08:48:13 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E98E21EDA1B; Thu, 17 Mar 2022 05:46:50 -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 sin.source.kernel.org (Postfix) with ESMTPS id 4ACC1CE2331; Thu, 17 Mar 2022 12:46:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 647ADC340E9; Thu, 17 Mar 2022 12:46:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521207; bh=xZN9NwYg0jpH9YWHF+IxdrhZLLyIkURN06b25Bjx/nk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=j2AwM+kU7nE8KSk+x0yd90lC4cI0ma4eAu/DhGuYUtZ8jcue3AZHG9iUK8CICQOWM yuS+DyPjCLln73sMCNIs1YGJKsyakg/enBjl8h8lf2L54YTfAKHBx2282pM/swbua7 UpV0MzPikQIYCbbiHLhNltAAerTUnS00EPN0Lc44= 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 , Sasha Levin Subject: [PATCH 5.4 13/43] arm64: entry: Move trampoline macros out of ifdefd section Date: Thu, 17 Mar 2022 13:45:24 +0100 Message-Id: <20220317124528.045253339@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124527.672236844@linuxfoundation.org> References: <20220317124527.672236844@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=-8.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: Sasha Levin --- arch/arm64/kernel/entry.S | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S index 09c78d6781a7..a2ec7ef24402 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -1025,12 +1025,6 @@ ENDPROC(el0_svc) .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 @@ -1126,6 +1120,11 @@ alternative_else_nop_endif .endr .endm +#ifdef CONFIG_UNMAP_KERNEL_AT_EL0 +/* + * Exception vectors trampoline. + */ + .pushsection ".entry.tramp.text", "ax" .align 11 ENTRY(tramp_vectors) generate_tramp_vector -- 2.34.1