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]
Message-ID: <alpine.LFD.0.9999.0711140826080.3265@localhost.localdomain>
Date:	Wed, 14 Nov 2007 08:49:50 +0100 (CET)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	"David P. Reed" <dpreed@...d.com>
cc:	linux-kernel@...r.kernel.org,
	Allessandro Zummo <a.zummo@...ertech.it>
Subject: Re: [PATCH] x86: fix locking and sync bugs in x86_64 RTC code in
 time_64.c

David,

On Mon, 12 Nov 2007, David P. Reed wrote:

> From: David P. Reed
> 
> Fix two bugs in arch/x86/kernel/time_64.c that affect the x86_64 kernel. 1) a
> repeatable hard freeze due to interrupts when the ntpd service calls
> update_persistent_clock(), 2) potentially unstable PC RTC timer values when
> timer is read.

1) Please send separate patches for separate problems.

2) Your patch is white space damaged and does not apply. Please run it
   through scripts/checkpatch.pl before submitting, maybe send it to
   yourself first and verify that it applies correctly.

> Signed-off-by: David P. Reed <dpreed@...d.com>
> ---
> More explanation:
> 1) A repeatable but randomly timed freeze has been happening in Fedora 6 and 7
> for the last year, whenever I run the ntpd service on my AMD64x2 HP Pavilion
> dv9000z laptop.  This freeze is due to the use of spin_lock(&rtc_lock) under
> the assumption (per a bad comment) that set_rtc_mmss is called only with
> interrupts disabled.  The call from ntp.c to update_persistent_clock is made
> with interrupts enabled.

Good catch.
 
> 2) the use of an incorrect technique for reading the standard PC RTC timer,
> which is documented to "disconnect" time registers from the bus while updates
> are in progress.  The use of UIP flag while interrupts are disabled to protect
> a 244 microsecond window is one of the Motorola spec sheet's documented ways
> to read the RTC time registers reliably.  I realize that not all "clones" of
> the

of the what ?

Also put the detailed description into the patch comment, please.

> The patch updates the misleading comments and minimizes the amount of time
> that the kernel disables interrupts.
> 
> I have thoroughly tested this patch on a number of x86_64 machines with
> various numbers of cores and chipsets, using 2.6.24rc2 kernel source. Note
> that while testing the ntp code I found another bug in kernel/time/ntp.c which
> is independent of this fix - neither patch requires the other.
>
> If possible, I'd love to see the patch merged with 2.6.24, and even with
> 2.6.23.

Care to resend ?

Thanks,

     tglx
-
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