From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-b2-smtp.messagingengine.com (fout-b2-smtp.messagingengine.com [202.12.124.145]) (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 4BB6313AA2D; Fri, 14 Nov 2025 08:01:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.145 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763107310; cv=none; b=phvOLLpyDWmQmTfkK8Z/H+qGG7Zn54ApWUHtvmcpIYu1h01GwyHlowdcrdedQqO29Wo9o8Jo4gTjmEyRIdJhv2hCRw1b5SezFtq5iw2sbHJUirSujYkZHsKPrHMF5fxQfjWfGYyxQg8zb+ypFqlD5fnr1NFubWMOc5xAUA8de6Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763107310; c=relaxed/simple; bh=AM99Za7F2UgjaayGXrnrD1m1mKDiPyqjuSZSYubQQs0=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=PslZnys0Cfwex6z8x+YukchqPKqprCY1K8oiAN23+779Jg4OBn4YfuWHnzv6UvYmzEhRcCO+4zEA+bCC2kqwrwM/vpx8k6+9HA3VUm/a6KsK91ujEw01g52bH9/Yo3kXdiKKsOrdEJ6zX0G5gTc01SPvTkHfc3jfR+awOEm2NWg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de; spf=pass smtp.mailfrom=arndb.de; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b=a+cGADRf; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=Mzcu1uVa; arc=none smtp.client-ip=202.12.124.145 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="a+cGADRf"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="Mzcu1uVa" Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfout.stl.internal (Postfix) with ESMTP id 599691D000F8; Fri, 14 Nov 2025 03:01:46 -0500 (EST) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-04.internal (MEProxy); Fri, 14 Nov 2025 03:01:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1763107306; x=1763193706; bh=GUfuQzs0UGJKCWgSC9jC5H1uycJ0SQm6HbNmJXyNyPw=; b= a+cGADRfy8MR6TvXl7pkksv8e+vUDXB6yzu4CgaeWjmOpm1cIQcEYeqfKCs3E0r1 YJVUWAFbt1jZ73xhzIyoWwBeG0RhpH9yE/JHrLJKi9JQj67f09XlW7OZPfYTpeTf WjDcfMVJISTSlfClIRtm9pgkVOPJovuR6YDIHzNTml3XqC7M3ZylMzUsArwk8RP5 p90FrsizJrPtGFH9YRMnagd1PIFIBL5NrOczVRAP62FKXfW6pkp5ey9bhsQD+mHr GZ4XoFiVn5APlhVNGxcJPj7qsCrE+DIYXb/PIY7Su5MOl3p0kbBCJxThdN3e4x3I Tr6zx3ISsBpj6JE9WIhoNw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1763107306; x= 1763193706; bh=GUfuQzs0UGJKCWgSC9jC5H1uycJ0SQm6HbNmJXyNyPw=; b=M zcu1uVaRnGEHV3Rj7qsjsLiOL2E9Miv0nwggsvqYk86Mb8qytbTQCjdwW0ms5ES2 G4zeqUGfPGzNuRc0TE6GpvQXW90K5O/O/qRTJ3NTSYb81LFosgJ2H9ET7iD5C4Uo P8tk3oJ20Rgfwop/RbPISZLFNBEJNSpYyNssN3T5Kdz+6DnlSWaJo29c/NCHM98T /af22Tew8V9mjp731zKfTxqMjPk2Szsw/zDFtResSguI9QaK+huTypo8qCAidojx urg08lowXQQ4DMmbqrrgjMIymqcLA41rFyclvrbuVv/OidPaL0fRNhOPyXyyJC+d Qkb3nFp5Jg6PsHTffQh/Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddvtdelvdelucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepofggfffhvfevkfgjfhfutgfgsehtqhertdertdejnecuhfhrohhmpedftehrnhgu uceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrthhtvg hrnhepvdfhvdekueduveffffetgfdvveefvdelhedvvdegjedvfeehtdeggeevheefleej necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghrnh gusegrrhhnuggsrdguvgdpnhgspghrtghpthhtohepjedpmhhouggvpehsmhhtphhouhht pdhrtghpthhtohepvhhinhgtvghniihordhfrhgrshgtihhnohesrghrmhdrtghomhdprh gtphhtthhopehluhhtoheskhgvrhhnvghlrdhorhhgpdhrtghpthhtohepshhhuhgrhhes khgvrhhnvghlrdhorhhgpdhrtghpthhtohepthhglhigsehlihhnuhhtrhhonhhigidrug gvpdhrtghpthhtohepthhhohhmrghsrdifvghishhsshgthhhuhheslhhinhhuthhrohhn ihigrdguvgdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnh gvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkshgvlhhfthgvshhtsehvghgvrhdr khgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 9C540700054; Fri, 14 Nov 2025 03:01:45 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ThreadId: AMhH2wAeH5kJ Date: Fri, 14 Nov 2025 09:01:13 +0100 From: "Arnd Bergmann" To: =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= , "Andy Lutomirski" , "Thomas Gleixner" , "Vincenzo Frascino" , shuah Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Message-Id: In-Reply-To: <20251113-vdso-test-types-v2-12-0427eff70d08@linutronix.de> References: <20251113-vdso-test-types-v2-0-0427eff70d08@linutronix.de> <20251113-vdso-test-types-v2-12-0427eff70d08@linutronix.de> Subject: Re: [PATCH v2 12/14] selftests: vDSO: vdso_test_correctness: Use system call wrappers from vdso_syscalls.h Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Thu, Nov 13, 2025, at 16:30, Thomas Wei=C3=9Fschuh wrote: >=20 > static void test_one_clock_gettime(int clock, const char *name) > { > + struct __kernel_timespec start, end; > struct __kernel_old_timespec vdso; > - struct timespec start, end; > int vdso_ret, end_ret; >=20 > printf("[RUN]\tTesting clock_gettime for clock %s (%d)...\n", name,=20 This looks confusing to me: I can see that the existing code is wrong because it passes a (libc-defined) timespec into the sys_clock_gettime() that expects __kernel_old_timespec. It looks like you are changing a sometimes-wrong type into a consistently wrong type, but then you also change the sys_clock_gettime() definition to return __kernel_timespec instead of __kernel_old_timespec, so it ends up working. Why not always use __kernel_old_timespec for the local variables and the sys_clock_gettime() calls here? > @@ -305,7 +291,7 @@ static void test_one_clock_gettime64(int clock, co= nst char *name) >=20 > printf("[RUN]\tTesting clock_gettime64 for clock %s (%d)...\n", name,= clock); >=20 > - if (sys_clock_gettime64(clock, &start) < 0) { > + if (sys_clock_gettime(clock, &start) < 0) { > if (errno =3D=3D EINVAL) { > vdso_ret =3D VDSO_CALL(vdso_clock_gettime64, 2, clock, &vdso); > if (vdso_ret =3D=3D -EINVAL) { This looks like the correct fix to me. We were already uses the same types for syscall and vdso paths, and now the types match the interface. Arnd