Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2258103pxp; Mon, 21 Mar 2022 15:09:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBMNjpG+bKEA2MKBILd7GCQbnqD5UlzpQFbp+30sJJGRe9mCQr73YUh4fwQwPncz/U6rQP X-Received: by 2002:a17:902:e54d:b0:154:48d5:4201 with SMTP id n13-20020a170902e54d00b0015448d54201mr9535356plf.61.1647900586099; Mon, 21 Mar 2022 15:09:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647900586; cv=none; d=google.com; s=arc-20160816; b=CjLCuSEN4IdTMfAvL7+CQwo1Xa8LD0ckMk5W60LKuKw1r5a/i2Y1aUSmga/JjsBAVY TazhMRNHDNl5rocaVH/tdAfTXrqJt27rMpaQxEln2jyAahZ8DbJTDfKgdoA5h3r/3iIx mkUZdldYHIgKbT6xr1YlXLrKBqOwexvY0rJIEfFOou3FfObt8vOeBpqNQOCeawu66PHl wYn+uNK833a99UFqwuDNiN88Yyyge4x/pHAAtvsBjyCNDWoyFp/uW3kkGL8KePvMaCHd 9fZK8PKvIgLSBE42Y0uGz5ApF2E659WNonmZ6LzHMuJKt+NF8tQkepTdsQaj50mrUTpo Et9Q== 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=rtUZSDHnASwqyOBAscNb1A9dbNopghb4cfDGqSKTzck=; b=Iu9PtuiTzC+5E2whfMhC8pDMQy2+7bU0MOfpH7T28TFOUTj/IZwpUW0mVEtKTUjrj6 prJUFZGHR0Hg8crIXpYe5n7LiTMK+0+35WmYQ+dObEfrMPpigdXRBF5Cqwhtf9OBrpKY ZXJ3prYpA6mPr+RUz2RR8vx+9fgWezbpfwpYw+kPojF5Ac28HZL5FPLhP3zTJVhHznS0 y98xCvoj+e3SWB9UZmI1LaGFRPVSMMjiLN2C9PX+Ulq+p86aWdTfG5Uc6vaMzH8VT0Mb +DmdGr/sXJ5Biyk5MsCiJcmJhIivf/25gLnhUlqi8bT/LrRji/iJ1AgI5iJRWrIme6/W V5Wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZSrzieM7; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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. [23.128.96.19]) by mx.google.com with ESMTPS id iq2-20020a17090afb4200b001c67393260esi455211pjb.72.2022.03.21.15.09.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 15:09:46 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZSrzieM7; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 634CF361AAB; Mon, 21 Mar 2022 14:30:12 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242115AbiCUOBW (ORCPT + 99 others); Mon, 21 Mar 2022 10:01:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348783AbiCUN6R (ORCPT ); Mon, 21 Mar 2022 09:58:17 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39530174BB6; Mon, 21 Mar 2022 06:56:31 -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 2A45A612F2; Mon, 21 Mar 2022 13:56:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 354B3C340ED; Mon, 21 Mar 2022 13:56:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647870983; bh=+cRuOoNDmwzag37vcUqbENMSP0FdPJl8YdzMLuF3ymE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZSrzieM7IyerEpI7KKdHSiW1CqAN83gGzcjT169/Z0skJ3pvv4PJbi+OcTh7y7oNB iE6kzbEiZhW+dn6q7EeCtwNGOxpyDk+bXgk1VYuj9us4QGHGDPxi51jMnGpIOTBo/2 VAdaPw+PVSKbX0nCYMJ9H0hIz2bGVz0qnKgc7nvQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman , "Russell King (Oracle)" , Catalin Marinas , James Morse Subject: [PATCH 4.19 32/57] arm64: entry: Move trampoline macros out of ifdefd section Date: Mon, 21 Mar 2022 14:52:13 +0100 Message-Id: <20220321133222.925652530@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220321133221.984120927@linuxfoundation.org> References: <20220321133221.984120927@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=-3.1 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 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -933,12 +933,7 @@ 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 add \tmp, \tmp, #(PAGE_SIZE + RESERVED_TTBR0_SIZE) @@ -1029,6 +1024,11 @@ alternative_insn isb, nop, ARM64_WORKARO .endr .endm +#ifdef CONFIG_UNMAP_KERNEL_AT_EL0 +/* + * Exception vectors trampoline. + */ + .pushsection ".entry.tramp.text", "ax" .align 11 ENTRY(tramp_vectors) generate_tramp_vector