From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.zytor.com (terminus.zytor.com [198.137.202.136]) (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 0C1641C8604; Thu, 5 Mar 2026 23:58:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.136 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772755133; cv=none; b=D5l+i0EawE79q3VKc/LV1SfdvJ2aX42twEQYA+CJNH69XX3gk2tNQNjNdIoEsdo9HGMi/4frIuEHA89E+8oG4mHRPsCP8ax++jougCdfKzgX+EzyEDoqPm4mO+n8IQL541NxwFzR/0Tr9pSeGHKQfgO1dUW4Dn1A4O2i65936Qs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772755133; c=relaxed/simple; bh=u0ruzJeL3Oj2CLeQWfVQGRmFR0siTaOoU1kaON5tpco=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=JQv3bGOTUi6DwYbJXc9A+Vs1FrYDqosWQ+vo9s6YAa+LG8NMDJcLUE2m5RlwU1HDWUUjFKnuTcysrJjjpXcO3EKk2W+k6KMY0pU4fLECt/Hhq7F5Lf7CJjzEjNad8uq9K0meRAb323dTYaecmXAcPcpuLe79NRBIiow9KmJ/caI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com; spf=pass smtp.mailfrom=zytor.com; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b=Tvl2j1qU; arc=none smtp.client-ip=198.137.202.136 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zytor.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b="Tvl2j1qU" Received: from [172.27.2.41] (c-76-133-66-138.hsd1.ca.comcast.net [76.133.66.138]) (authenticated bits=0) by mail.zytor.com (8.18.1/8.17.1) with ESMTPSA id 625Nw4w04152111 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Thu, 5 Mar 2026 15:58:06 -0800 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 625Nw4w04152111 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2026022301; t=1772755088; bh=qJtO9dV/a12LOlMN5IETBh0hhQHpj32DpsR053nFryw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Tvl2j1qUAzEOzpzYcXQS0HDWX3adrrEh8wGU4v6g3BKySEWm3C2C7N7KAEslkCD/E j0mWPPahQcrnUpYonuB/XqRZBRARS5nEmqhvWuzwTipZgTaSbKeFgyWaowiUd42153 W7MStsBNkxFELd7Ua0ug4CAdu1aF7aWnHPLKAnKGLgvygP3YPLayYTvsiXAb3FaFZT JKrUtuYJyk4iWE4XrNI9xqZLO4q9kEtp3+p0jqjDQ721IZmuf1wgsaxQhQozEAFd76 RGAdRJL6GAk2KUvF8L9JrLDfa7jSFNoyWL3JroGMHmBAm94WVUO71tOQTKh8CZxiYj iqR+oML2O5VlA== Message-ID: <2e609a1b-62de-4688-b363-58025ab9e703@zytor.com> Date: Thu, 5 Mar 2026 15:57:59 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/7] x86/vdso: Respect COMPAT_32BIT_TIME To: =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= Cc: Arnd Bergmann , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Russell King , Catalin Marinas , Will Deacon , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Thomas Bogendoerfer , Vincenzo Frascino , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-mips@vger.kernel.org References: <20260227-vdso-compat_32bit_time-v1-0-3f0286a7bac3@linutronix.de> <20260227-vdso-compat_32bit_time-v1-1-3f0286a7bac3@linutronix.de> <03cd1e21-a2f2-46a1-a674-cbaef9712016@app.fastmail.com> <20260227103226-cc3bb32c-0107-4c09-b81a-ca33ea03ad5c@linutronix.de> <49b7c9f9-198a-49f7-880b-6ae74d7bd985@zytor.com> <20260304081505-a2a3a376-20c9-46cb-8dc9-2c4deec1a55e@linutronix.de> <6909A81E-AE50-459C-9604-3EEAEFE3838E@zytor.com> <20260305080950-ff43457b-0551-480f-916e-6c252e6a64af@linutronix.de> Content-Language: en-US, sv-SE From: "H. Peter Anvin" In-Reply-To: <20260305080950-ff43457b-0551-480f-916e-6c252e6a64af@linutronix.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 2026-03-05 01:24, Thomas Weißschuh wrote: > >> Weak references would be a way to work around the link failures. > > I am still not sure where "the link failures" should be coming from. > The only sense I can make out of it, is if somebody manually and directly links > to vdso.so. Like in the following example: > > $ cat test.c > #include > > #include > > int __vdso_clock_gettime(__kernel_clockid_t clock, struct __kernel_timespec *ts); > > int main(void) > { > struct __kernel_timespec ts; > int ret; > > printf("__vdso_clock_gettime=%p\n", __vdso_clock_gettime); > > ret = __vdso_clock_gettime(CLOCK_REALTIME, &ts); > printf("ret=%d\n", ret); > } > $ gcc test.c /lib/modules/$(uname -r)/vdso/vdso64.so > $ ./a.out > __vdso_clock_gettime=0x7ff6ba2eeb80 > ret=0 > > This actually works on glibc (not on musl). But it is highly non-standard and > relies on multiple implementation details. Furthermore it can fail to run on > systems without a vDSO, as mentioned before. > > Is this the usage pattern you have in mind? > Do you know of anybody doing things this way? > Yes, and yes, I do. -hpa