From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 30094CDD1AE for ; Fri, 27 Sep 2024 13:50:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=2/zXRjdSf8TOXfxciBmCEtn3ms1nJ7wSZrJ46lTbmwQ=; b=hwcbbqCUK3Jj18+HAhogDzwVyh DCsjlfrsl0JkdmgTreUb00MHYCuFKtL2UHCBC+i6KkV9RKJ1JgbdeEYtvfOyHcWCRhxjSto8e69ui owov/hnF+I6kdyJkcZOgZBUuaFX/suUPmJDHdubEaZlbH9CxVqNYa6VVxjISVgAnxU0sda2hCCLfq gyXGs0Q4IycYQPjtJzV7RMUynwXf35RnXuoamAQlGx8ubWXKH+p0dTGWHAUa7v2GaGtkmAScL0uqR iQS5K+gRaHMxxvYThCho9E3ArTqbngQPRnyACaANnAgf3guY0oy3P4aGk2jUgiYnwCZLsb6YmTajH cpPcif0w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1suBMY-0000000BMcr-0zNh; Fri, 27 Sep 2024 13:50:26 +0000 Received: from nyc.source.kernel.org ([2604:1380:45d1:ec00::3]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1suBLK-0000000BMLn-3J2T for linux-arm-kernel@lists.infradead.org; Fri, 27 Sep 2024 13:49:12 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 1E3CCA449EF; Fri, 27 Sep 2024 13:49:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 86595C4CEC4; Fri, 27 Sep 2024 13:49:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1727444948; bh=D5DLF5UNT+fTthMtO493MEXe+iRWRMNAQOeJn1bfBZ4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oRw+RxSmdRUStubGu6k4S5DMDUB4Ez203K5lVNZahLugUAO483pruPkKCgM9bxxcJ ilxOeTfbxY6aO3/zim6RH9v/LC6U2PiDMGPtuyvWmhYKxtZVNiryN2Ai5xznEEubI+ Kj4zJqWeopdJ9sbEXhV7Fa0FgEuljS9+YupDS69AIqVxLOgW4+mjDq82uBYTVNSyU+ Liw2cpbzcPDTEH5VzVkIZB/VNw3yVSe/p/vQidF4sGxg2DFhGK5spdDefaIitaRCpk Re7jnPaTjLj1ofQ7WDEuyAzkF5Ro9uo9UMggk6xu48+28HO/Nmy4+TfOv6iKGDMx+R WXy3YQcWENicQ== Date: Fri, 27 Sep 2024 06:49:05 -0700 From: Nathan Chancellor To: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org, ardb@kernel.org, catalin.marinas@arm.com, maz@kernel.org, ndesaulniers@google.com, will@kernel.org Subject: Re: [PATCH] arm64: Force position-independent veneers Message-ID: <20240927134905.GA430964@thelio-3990X> References: <20240927101838.3061054-1-mark.rutland@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240927101838.3061054-1-mark.rutland@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240927_064910_912651_2ADF6E70 X-CRM114-Status: GOOD ( 19.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Sep 27, 2024 at 11:18:38AM +0100, Mark Rutland wrote: > Certain portions of code always need to be position-independent > regardless of CONFIG_RELOCATABLE, including code which is executed in an > idmap or which is executed before relocations are applied. In some > kernel configurations the LLD linker generates position-dependent > veneers for such code, and when executed these result in early boot-time > failures. > > Marc Zyngier encountered a boot failure resulting from this when > building a (particularly cursed) configuration with LLVM, as he reported > to the list: Heh, I admire the "particularly cursed" bit. > I've tested with GNU LD 2.30 to 2.42 inclusive and LLVM 13.0.1 to 19.1.0 > inclusive, using the kernel.org binaries from: > > * https://mirrors.edge.kernel.org/pub/tools/crosstool/ > * https://mirrors.edge.kernel.org/pub/tools/llvm/ > > Signed-off-by: Mark Rutland > Reported-by: Marc Zyngier > Cc: Ard Biesheuvel > Cc: Catalin Marinas > Cc: Nathan Chancellor > Cc: Nick Desaulniers > Cc: Will Deacon Thanks for the patch! Reviewed-by: Nathan Chancellor > --- > arch/arm64/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile > index f6bc3da1ef110..c8e237b20ef29 100644 > --- a/arch/arm64/Makefile > +++ b/arch/arm64/Makefile > @@ -10,7 +10,7 @@ > # > # Copyright (C) 1995-2001 by Russell King > > -LDFLAGS_vmlinux :=--no-undefined -X > +LDFLAGS_vmlinux :=--no-undefined -X --pic-veneer > > ifeq ($(CONFIG_RELOCATABLE), y) > # Pass --no-apply-dynamic-relocs to restore pre-binutils-2.27 behaviour > -- > 2.30.2 >