lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250710062249.3533485-1-m.szyprowski@samsung.com>
Date: Thu, 10 Jul 2025 08:22:49 +0200
From: Marek Szyprowski <m.szyprowski@...sung.com>
To: Thomas Gleixner <tglx@...utronix.de>, linux-kernel@...r.kernel.org,
	linux-kselftest@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-arch@...r.kernel.org
Cc: Marek Szyprowski <m.szyprowski@...sung.com>, Andy Lutomirski
	<luto@...nel.org>, Vincenzo Frascino <vincenzo.frascino@....com>, Shuah Khan
	<shuah@...nel.org>, Anna-Maria Behnsen <anna-maria@...utronix.de>, Frederic
	Weisbecker <frederic@...nel.org>, John Stultz <jstultz@...gle.com>, Stephen
	Boyd <sboyd@...nel.org>, Catalin Marinas <catalin.marinas@....com>, Will
	Deacon <will@...nel.org>, Arnd Bergmann <arnd@...db.de>, Richard Cochran
	<richardcochran@...il.com>, Christopher Hall <christopher.s.hall@...el.com>,
	Miroslav Lichvar <mlichvar@...hat.com>, Werner Abt
	<werner.abt@...nberg-usa.com>, David Woodhouse <dwmw2@...radead.org>, Kurt
	Kanzenbach <kurt@...utronix.de>, Nam Cao <namcao@...utronix.de>, Antoine
	Tenart <atenart@...nel.org>
Subject: [PATCH] vdso/gettimeofday: Fix code refactoring

Commit fcc8e46f768f ("vdso/gettimeofday: Return bool from clock_gettime()
helpers") changed the return value from clock_gettime() helpers, but it
missed updating the one call to the do_hres() function, what breaks VDSO
operation on some of my ARM 32bit based test boards. Fix this.

Fixes: fcc8e46f768f ("vdso/gettimeofday: Return bool from clock_gettime() helpers")
Signed-off-by: Marek Szyprowski <m.szyprowski@...sung.com>
---
 lib/vdso/gettimeofday.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/vdso/gettimeofday.c b/lib/vdso/gettimeofday.c
index d6743ed756a1..97aa9059a5c9 100644
--- a/lib/vdso/gettimeofday.c
+++ b/lib/vdso/gettimeofday.c
@@ -395,7 +395,7 @@ __cvdso_gettimeofday_data(const struct vdso_time_data *vd,
 	if (likely(tv != NULL)) {
 		struct __kernel_timespec ts;
 
-		if (do_hres(vd, &vc[CS_HRES_COARSE], CLOCK_REALTIME, &ts))
+		if (!do_hres(vd, &vc[CS_HRES_COARSE], CLOCK_REALTIME, &ts))
 			return gettimeofday_fallback(tv, tz);
 
 		tv->tv_sec = ts.tv_sec;
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ