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:	Thu, 24 Sep 2009 16:09:46 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Mike Heffner <mikeh@...nel.com>
Cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	john stultz <johnstul@...ibm.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Oleg Nesterov <oleg@...hat.com>
Subject: Re: HR timers prevent an itimer from generating EINTR?

(cc's added)

(it's a regression)

(it has a testcase!)

On Fri, 04 Sep 2009 17:26:35 -0400
Mike Heffner <mikeh@...nel.com> wrote:

> Summary:
> 
> Mixing HR timers with itimers occasionally hides an EINTR from a 
> blocking syscall.
> 
> 
> Description:
> 
> In my test program I have a High Resolution timer firing every one 
> second (with SA_RESTART) and I set an itimer (without SA_RESTART) to 
> fire after three seconds. I then execute a blocking system call (flock 
> in this case) and expect the three second itimer to interrupt the system 
> call with EINTR. However, I frequently notice that the itimer will fire 
> but it will not interrupt the blocking system call. There appears to be 
> a race between the HR timer firing and the itimer firing. If I offset 
> the HR timer frequency by a half second, the itimer always interrupts 
> the system call.
> 
> Kernel version:
> 
> These kernels both demonstrate the condition:
> 
> 2.6.29.6-217.2.16.fc11.x86_64
> 	and
> 2.6.30.5-43.fc11.x86_64
> 
> 
> I do not see this condition on:
> 
> 2.6.18-53.el5
> 
> 
> Test program:
> 
> The following program illustrates this condition:
> 
> http://github.com/mheffner/scripts/commits/master/hrtimer_vs_itimer.c
> 
> 
> Is this behavior expected?
> 
> 

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