From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7436728C2BF for ; Mon, 16 Mar 2026 21:29:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773696557; cv=none; b=UnSCPHSdNH/ZCRkAqCWvW/V0PIzDpbrVHZ5tgzIPKfufHE3UmiOiRvwsJ1yfQzu+H8v57zquguChKyUvrQ7zRa0vQq/w6/asgJdvdAjjiey+nYPGlGw9LxuGsUaypdKdb0on0heipb3oCjGga4MpR5AXP3VLV4X/ruWBubbl424= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773696557; c=relaxed/simple; bh=ZCg2hWQKF/c+seK8Yo7/1Pxx//suxJJMLGqWd2HlJpw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=OxTrpdedCgxUfS7U24ZtCB91GNdQHTFKsJUro+6UZDn9AQd2xUzqFNTzr3I1v7wB2OZaeleK16FGoNbY+npD1F+NVdkUFtlzb3Dgnngsj0+xNTx9PFSyFezpYqcAsnh1lnzL0ciLhatD7ojHNwJ9LHa00ECiZ404IvwEsmbtRH4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ESXy9/2e; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ESXy9/2e" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7D0D7C19421; Mon, 16 Mar 2026 21:29:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1773696557; bh=ZCg2hWQKF/c+seK8Yo7/1Pxx//suxJJMLGqWd2HlJpw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=ESXy9/2eHd7nX2oiGNKWwnC843+0iY9s0c/uEpaRYTs6KB61mbFoR8ioLcfQWvxem wrotUoJDnmA9FIIyuXipQnbLe5/P3eTLTsrhZQ2/UAP+OYpDkZXx9UCKh7SacvIyji /xr8MUj3I9XAYMoEZVLFSPViogybpNVqj6FlI6seerm6FFgD9y6tdCMO66nNCGO7pM bMrEai5FwcXErnFvdoWc3POAD10hJ7Y/kyQO9OSPW3pBj61OR82oUssprPfkLRnSZp tkmIbf0ol89PC2H/vvve2sRcv47tMsphpTQ9Nzt0cPow01at4EdO1UdvTroxVf8Vsk xPmbl2DL9ydJw== From: Thomas Gleixner To: Mathieu Desnoyers , LKML Cc: =?utf-8?Q?Andr=C3=A9?= Almeida , Sebastian Andrzej Siewior , Carlos O'Donell , Peter Zijlstra , Florian Weimer , Rich Felker , Torvald Riegel , Darren Hart , Ingo Molnar , Davidlohr Bueso , Arnd Bergmann , "Liam R . Howlett" Subject: Re: [patch 8/8] x86/vdso: Implement __vdso_futex_robust_try_unlock() In-Reply-To: <7b942738-231b-4168-8d97-0e5c974af2e9@efficios.com> References: <20260316162316.356674433@kernel.org> <20260316164951.484640267@kernel.org> <7b942738-231b-4168-8d97-0e5c974af2e9@efficios.com> Date: Mon, 16 Mar 2026 22:29:13 +0100 Message-ID: <87pl53o446.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Mon, Mar 16 2026 at 15:19, Mathieu Desnoyers wrote: > On 2026-03-16 13:13, Thomas Gleixner wrote: >> +{ >> + asm volatile ( >> + ".global __vdso_futex_robust_try_unlock_cs_start \n" >> + ".global __vdso_futex_robust_try_unlock_cs_success \n" >> + ".global __vdso_futex_robust_try_unlock_cs_end \n" > > Those .global are fragile: they depend on making sure the compiler does > not emit those symbols more than once per compile unit (due to > optimizations). This is a single global function which contains the unique ASM code with those unique symbols. The unique compilation unit containing it ends up in the VDSO "library". Q: Which optimizations would cause the compiler to emit them more than once? A: None. If that happens then the compiler is seriously broken and the resulting VDSO trainwreck is the least of your worries. That would be equivalent to a single global C function in a unique compilation unit being emitted more than once. So what is fragile about that? Thanks, tglx