All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bert Karwatzki <spasswolf@web.de>
To: linux-kernel@vger.kernel.org
Cc: "Bert Karwatzki" <spasswolf@web.de>,
	linux-next@vger.kernel.org,
	"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
	"Thomas Gleixner" <tglx@linutronix.de>
Subject: CONFIG_DEVMEM=y breaks gettimeofday in next-20250708
Date: Wed,  9 Jul 2025 14:42:15 +0200	[thread overview]
Message-ID: <20250709124216.3011-1-spasswolf@web.de> (raw)
In-Reply-To: <20250701-vdso-auxclock-v1-6-df7d9f87b9b8@linutronix.de>

Recently I found that my RAM has an error (memtest86+ reproducibly reports
a failing address) (this error may lead to random crashes every few days). 
To further investigate the issue I tried using memtester which needs access 
to /dev/mem and so I recompiled linux next-20250708 with CONFIG_DEMEM=y 
and found a strange and unusual side effect:

a) the time displayed by xfce is stuck at 1.1.1970 01:00 (UTC + 1)
b) most certificates in firefox-esr fail to work due to the date being 1.1.1970 
(this includes www.google.de, www.duckduckgo.com, wikipedia and youtube and many more)
c) some certificates in firefox-esr still work (kernel.org, xkcd.com, www.spiegel.de)
d) the shell built-in time (and also /usr/bin/time) fail to work, e.g.
$ time sleep 5
real	0m0,000s
user	0m0,000s
sys	0m0,002s
(even though it actually take 5 seconds for this)
e) date still works correctly, e.g.
$ date
Mi 9. Jul 11:51:20 CEST 2025
f) This example program 

#include <stdlib.h>
#include <stdio.h>
#include <sys/time.h>

int main()
{
	int ret;
	struct timeval tv;
	struct timezone tz;

	ret = gettimeofday(&tv, &tz);
	printf("gettimeofday returns ret = %d, tv.tv_sec = %lu tv.tv_usec = %lu\n", ret, tv.tv_sec, tv.tv_usec);

	return 0;
}

gives the following output on affected versions:

$
gettimeofday returns ret = 0, tv.tv_sec = 0 tv.tv_usec = 0


These errors do not occur when using v6.16-rc5 with CONFIG_DEVMEM=y, and are 100%
reproducible so are not related to the RAM error. 

I bisected the issue in between
v6.16-rc5 and next-20250708 and found commit fcc8e46f768f ("vdso/gettimeofday:
Return bool from clock_gettime() helpers") as the first bad commit.

Bert Karwatzki

  parent reply	other threads:[~2025-07-09 12:42 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-01  8:57 [PATCH 00/14] vdso: Add support for auxiliary clocks Thomas Weißschuh
2025-07-01  8:57 ` [PATCH 01/14] selftests/timers: Add testcase " Thomas Weißschuh
2025-07-01  8:57 ` [PATCH 02/14] vdso/vsyscall: Introduce a helper to fill clock configurations Thomas Weißschuh
2025-07-07  7:11   ` [tip: timers/ptp] " tip-bot2 for Thomas Weißschuh
2025-07-09  9:57   ` tip-bot2 for Thomas Weißschuh
2025-07-01  8:57 ` [PATCH 03/14] vdso/vsyscall: Split up __arch_update_vsyscall() into __arch_update_vdso_clock() Thomas Weißschuh
2025-07-07  7:11   ` [tip: timers/ptp] " tip-bot2 for Thomas Weißschuh
2025-07-09  9:57   ` tip-bot2 for Thomas Weißschuh
2025-07-01  8:57 ` [PATCH 04/14] vdso/helpers: Add helpers for seqlocks of single vdso_clock Thomas Weißschuh
2025-07-07  7:11   ` [tip: timers/ptp] " tip-bot2 for Thomas Weißschuh
2025-07-09  9:57   ` tip-bot2 for Thomas Weißschuh
2025-07-01  8:57 ` [PATCH 05/14] vdso/gettimeofday: Return bool from clock_getres() helpers Thomas Weißschuh
2025-07-07  7:11   ` [tip: timers/ptp] " tip-bot2 for Thomas Weißschuh
2025-07-09  9:57   ` tip-bot2 for Thomas Weißschuh
2025-07-01  8:58 ` [PATCH 06/14] vdso/gettimeofday: Return bool from clock_gettime() helpers Thomas Weißschuh
2025-07-07  7:11   ` [tip: timers/ptp] " tip-bot2 for Thomas Weißschuh
2025-07-08 15:17   ` [PATCH 06/14] " Marek Szyprowski
2025-07-08 15:49     ` Marek Szyprowski
2025-07-09  7:34       ` Thomas Weißschuh
2025-07-09  8:04         ` Marek Szyprowski
2025-07-16 12:25           ` Mark Brown
2025-07-16 12:34             ` Thomas Weißschuh
2025-07-16 12:50               ` Mark Brown
2025-07-16 13:23                 ` Thomas Weißschuh
2025-07-16 14:35                   ` Mark Brown
2025-07-18 12:02                     ` Thomas Weißschuh
2025-07-19 11:16                     ` David Laight
2025-07-09  8:29   ` Mark Brown
2025-07-09  9:57   ` [tip: timers/ptp] " tip-bot2 for Thomas Weißschuh
2025-07-09 12:42   ` Bert Karwatzki [this message]
2025-07-09 13:17     ` CONFIG_DEVMEM=y breaks gettimeofday in next-20250708 Thomas Weißschuh
2025-07-09 16:40       ` Bert Karwatzki
2025-07-18 11:56   ` [tip: timers/ptp] vdso/gettimeofday: Return bool from clock_gettime() helpers tip-bot2 for Thomas Weißschuh
2025-07-01  8:58 ` [PATCH 07/14] vdso/gettimeofday: Introduce vdso_clockid_valid() Thomas Weißschuh
2025-07-07  7:11   ` [tip: timers/ptp] " tip-bot2 for Thomas Weißschuh
2025-07-09  9:57   ` tip-bot2 for Thomas Weißschuh
2025-07-18 11:56   ` tip-bot2 for Thomas Weißschuh
2025-07-01  8:58 ` [PATCH 08/14] vdso/gettimeofday: Introduce vdso_set_timespec() Thomas Weißschuh
2025-07-07  7:11   ` [tip: timers/ptp] " tip-bot2 for Thomas Weißschuh
2025-07-09  9:57   ` tip-bot2 for Thomas Weißschuh
2025-07-18 11:56   ` tip-bot2 for Thomas Weißschuh
2025-07-01  8:58 ` [PATCH 09/14] vdso/gettimeofday: Introduce vdso_get_timestamp() Thomas Weißschuh
2025-07-07  7:11   ` [tip: timers/ptp] " tip-bot2 for Thomas Weißschuh
2025-07-09  9:57   ` tip-bot2 for Thomas Weißschuh
2025-07-18 11:56   ` tip-bot2 for Thomas Weißschuh
2025-07-01  8:58 ` [PATCH 10/14] vdso: Introduce aux_clock_resolution_ns() Thomas Weißschuh
2025-07-07  7:11   ` [tip: timers/ptp] " tip-bot2 for Thomas Weißschuh
2025-07-09  9:57   ` tip-bot2 for Thomas Weißschuh
2025-07-18 11:56   ` tip-bot2 for Thomas Weißschuh
2025-07-01  8:58 ` [PATCH 11/14] vdso/vsyscall: Update auxiliary clock data in the datapage Thomas Weißschuh
2025-07-07  6:57   ` Thomas Gleixner
2025-07-07 11:34     ` Arnd Bergmann
2025-07-07 13:16       ` Thomas Gleixner
2025-07-07 14:48         ` Arnd Bergmann
2025-07-07  7:11   ` [tip: timers/ptp] " tip-bot2 for Thomas Weißschuh
2025-07-09  9:57   ` tip-bot2 for Thomas Weißschuh
2025-07-18 11:56   ` tip-bot2 for Thomas Weißschuh
2025-07-01  8:58 ` [PATCH 12/14] vdso/gettimeofday: Add support for auxiliary clocks Thomas Weißschuh
2025-07-06 19:31   ` Thomas Gleixner
2025-07-07  7:11   ` [tip: timers/ptp] " tip-bot2 for Thomas Weißschuh
2025-07-09  9:57   ` tip-bot2 for Thomas Weißschuh
2025-07-18 11:56   ` tip-bot2 for Thomas Weißschuh
2025-07-18 12:14   ` tip-bot2 for Thomas Weißschuh
2025-08-20  8:03   ` [PATCH 12/14] " John Stultz
2025-08-20 10:15     ` Thomas Weißschuh
2025-07-01  8:58 ` [PATCH 13/14] Revert "selftests: vDSO: parse_vdso: Use UAPI headers instead of libc headers" Thomas Weißschuh
2025-07-06 20:43   ` Thomas Gleixner
2025-07-07  6:21     ` Thomas Weißschuh
2025-07-01  8:58 ` [PATCH 14/14] selftests/timers/auxclock: Test vDSO functionality Thomas Weißschuh
2025-07-06 20:26   ` Thomas Gleixner
2025-07-07  7:17     ` Thomas Weißschuh
2025-07-07 13:18       ` Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250709124216.3011-1-spasswolf@web.de \
    --to=spasswolf@web.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=thomas.weissschuh@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.