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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 16 Jan 2008 15:15:01 +0100 (CET)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Dhaval Giani <dhaval@...ux.vnet.ibm.com>
cc:	Andrew Paprocki <andrew@...iboo.com>, linux-kernel@...r.kernel.org,
	Balaji Rao <balajirrao@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Ingo Molnar <mingo@...e.hu>, clemens@...isch.de,
	venkatesh.pallipadi@...el.com, bob.picco@...com
Subject: Re: HPET timer broken using 2.6.23.13 / nanosleep() hangs

On Sun, 13 Jan 2008, Dhaval Giani wrote:
> On Sun, Jan 13, 2008 at 08:10:46AM -0500, Andrew Paprocki wrote:
> > I applied the patch to my 2.6.23.13 tree and upon reboot it stopped right after:
> > 
> > Clocksource tsc unstable (delta = ... ns)
> > Time: hpet clocksource has been installed.
> > 
> > It locked up hard.. cursor stopped blinking and SysRq isn't working either.

The hint is in the original report:

Clocksource tsc unstable (delta = 500013666 ns)

That means, that the TSC was counting, but HPET not. So it looks like
the HPET readout is stale. Which explains, why after switching to HPET
clocksource the time system gets hosed.

I wonder why the HPET counter works check did not catch this.

Can you please apply the path below and provide the output ?

Thanks,

	tglx

Index: linux-2.6/arch/x86/kernel/hpet.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/hpet.c	2008-01-16 08:29:28.000000000 +0100
+++ linux-2.6/arch/x86/kernel/hpet.c	2008-01-16 15:13:19.000000000 +0100
@@ -323,7 +323,7 @@ static struct clocksource clocksource_hp
 static int hpet_clocksource_register(void)
 {
 	u64 tmp, start, now;
-	cycle_t t1;
+	cycle_t t1, t2;
 
 	/* Start the counter */
 	hpet_start_counter();
@@ -343,12 +343,17 @@ static int hpet_clocksource_register(voi
 		rdtscll(now);
 	} while ((now - start) < 200000UL);
 
-	if (t1 == read_hpet()) {
+	t2 = read_hpet();
+	if (t1 == t2) {
 		printk(KERN_WARNING
 		       "HPET counter not counting. HPET disabled\n");
 		return -ENODEV;
 	}
 
+	printk(KERN_INFO "HPET check: t1=%lu t2=%lu s=%lu n=%lu\n",
+	       (unsigned long) t1, (unsigned long) t2,
+	       (unsigned long) start, (unsigned long) now);
+
 	/* Initialize and register HPET clocksource
 	 *
 	 * hpet period is in femto seconds per cycle

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ