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 E563AC79FA0 for ; Tue, 8 Sep 2026 07:37:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Dzi+sMeXtORdjqMsztUQmGhyIXPZlfesAOwbeJFo8zM=; b=fqTw7wcM2ea5Bd Jd/0NBk9ZQO+VMaiu5z9eYVY7Zr03LXa1pdV9j//hA9NhdPWdgSHh3DmyDBmGQGSQUmMRTaqgUo2P S0FLM9mEqz9kr8iJ9J//Kjrhebcu2EXQ15tL/PvZHz4InDvYgWNE/fTUa2bBD3pjU+WxRcEE1j0uO FaFcTVw0fyDqOP7Q0d5K5xhkbn2EMtuf42Y/EiLqaUHA9LEOdftZnwske5jnWM5zr+rdmkR2X08SZ bulCfP3TmKtLHFdwzep1alnkmFK3bw1RvBjak+cV+zqKzGJW2LW9kJM+sI8O0vNElAkqmykC33vcC zlKjpTfPzO4+QFVfr+HQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1x3qOH-00000008IG8-3Jw7; Tue, 08 Sep 2026 07:37:13 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1x3qOG-00000008IFA-1HVg; Tue, 08 Sep 2026 07:37:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=dMspgRwQUUIexqKss7dqowtOmwD0tLbRBkFb+1ouQnY=; b=irAwsshPXpU7Uf/rfFaj3uWs6G difPdlK64/emyFJJjlL7wNOeoAd6Y+U30iaYxFlQNgUaXhJ5XP9GQvgT7SeejFL749VvbdmXzNQmr ysoKC7HRo3DXe9AyxTg6XU4ih3jJvnovv2Ujltj+xakHIL0+9ST9dekY+kWUCq6mECTuqGA167fg+ YqFWds1pqUcKbMJUd2jIJjqcUYt3toc+D0q3aR2UwfeZbWbAc5JAxTcsD0VD8CvN28YZRwquKZu0g pKwTeSbCwX4MUVnlh4QxgKngIIgLaxab029w2jsxL2wYaE+8OY428gXbHH21x+RnEEnFMu/t4r9jb gZmtLwfw==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.99.2 #2 (Red Hat Linux)) id 1x3qOD-0000000H407-3KtV; Tue, 08 Sep 2026 07:37:10 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id E0348300400; Tue, 08 Sep 2026 09:37:07 +0200 (CEST) Date: Tue, 8 Sep 2026 09:37:07 +0200 From: Peter Zijlstra To: Thomas =?iso-8859-1?Q?Wei=DFschuh?= Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Andy Lutomirski , Vincenzo Frascino , Kees Cook , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Richard Weinberger , Anton Ivanov , Johannes Berg , Russell King , Catalin Marinas , Will Deacon , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Huacai Chen , WANG Xuerui , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Thomas Bogendoerfer , Miguel Ojeda , Alex Gaynor , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , Thomas Gleixner , Christophe Leroy , Boqun Feng , Nicolas Schier , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-mm@kvack.org, linux-um@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, loongarch@lists.linux.dev, linux-s390@vger.kernel.org, linux-mips@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-kbuild@vger.kernel.org, Jan Stancek , Arnaldo Carvalho de Melo , Alexandre Ghiti Subject: Re: [PATCH v5 12/24] vdso: Add the vdsocheck tool Message-ID: <20260908073707.GV4120091@noisy.programming.kicks-ass.net> References: <20260908-vdso-absolute-reloc-v5-0-3a93791af1cf@linutronix.de> <20260908-vdso-absolute-reloc-v5-12-3a93791af1cf@linutronix.de> <20260908071911.GU4120091@noisy.programming.kicks-ass.net> <20260908093302-1a1cf0c7-8103-48b1-9f6a-abd5c5c16523@linutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20260908093302-1a1cf0c7-8103-48b1-9f6a-abd5c5c16523@linutronix.de> X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Tue, Sep 08, 2026 at 09:35:46AM +0200, Thomas Wei=DFschuh wrote: > On Tue, Sep 08, 2026 at 09:19:11AM +0200, Peter Zijlstra wrote: > > On Tue, Sep 08, 2026 at 08:33:46AM +0200, Thomas Wei=DFschuh wrote: > > > All vDSO code needs to be completely position independent. Symbol > > > references are marked as hidden so the compiler emits PC-relative > > > relocations. However there are cases where the compiler may still > > > emit absolute relocations, as they are valid in regular PIC DSO code. > > > These would be resolved by the linker and will break at runtime. > > > This has been observed on arm64, see commit 0c314cda9325 ("arm64: vds= o: > > > Work around invalid absolute relocations from GCC") > > > = > > > Introduce a tool to check for absolute relocations during the build, > > > as the current inline-shell logic is not expressive enough. > > > The check is done on the object files as the relocations will not exi= st > > > anymore in the final DSO. As there is no extension point for the > > > compilation of each object file, perform the validation in vdso_check. > > > = > > > Signed-off-by: Thomas Wei=DFschuh > > > --- > > > Makefile | 19 ++ > > > lib/vdso/Kconfig | 5 + > > > lib/vdso/Makefile | 2 + > > > lib/vdso/Makefile.include | 14 ++ > > > lib/vdso/check/.gitignore | 3 + > > > lib/vdso/check/Makefile | 34 +++ > > > lib/vdso/check/elf.rs | 498 ++++++++++++++++++++++++++++++++++= ++++++++++ > > > lib/vdso/check/vdsocheck.rs | 154 ++++++++++++++ > > > 8 files changed, 729 insertions(+) > > = > > Urgh, does this mean I have to have rust installed just to build a > > kernel now? > = > No. > = > If you don't have rust installed the build will instead use the existing = shell > script for a less thorough check. We only need one build machine at some = point > to have rust installed to report issues and this check to be useful. Ah, *phew*. Thanks! _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv