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, 18 Aug 2010 16:53:03 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	Alexander Shishkin <virtuoso@...nd.org>, lkml@...r.kernel.org,
	"Kirill A. Shutemov" <kirill@...temov.name>,
	Thomas Gleixner <tglx@...utronix.de>,
	John Stultz <johnstul@...ibm.com>,
	Martin Schwidefsky <schwidefsky@...ibm.com>,
	Jon Hunter <jon-hunter@...com>, Ingo Molnar <mingo@...e.hu>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	David Howells <dhowells@...hat.com>,
	Avi Kivity <avi@...hat.com>, John Kacur <jkacur@...hat.com>,
	Chris Friesen <chris.friesen@...band.com>,
	Kay Sievers <kay.sievers@...y.org>, Greg KH <gregkh@...e.de>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [RFCv2] notify userspace about time changes

On Wed, 18 Aug 2010 16:43:48 -0700
"H. Peter Anvin" <hpa@...or.com> wrote:

> On 08/18/2010 03:57 PM, Andrew Morton wrote:
> > On Wed, 18 Aug 2010 16:55:39 +0300
> > Alexander Shishkin <virtuoso@...nd.org> wrote:
> > 
> >> Certain userspace applications (like "clock" desktop applets or cron) might
> >> want to be notified when some other application changes the system time.
> > 
> > The requirements sound a bit fluffy to me.
> > 
> > Any time-displaying application will find out the new time next time
> > it reads the time.  So afaict this is only really useful for clock
> > applets which display once per minute, so they will show the new time
> > promptly after the time was altered, yes?  Is that really worth adding
> > new code for?
> > 
> 
> Actually a much more significant use case was given for the "civil
> periodic" type events: something that wants to happen "every day at
> noon", for example.  The logical thing of sleeping until the next noon
> breaks if the walltime clock is changed.  As such, things like cron have
> to resort to wake up once a minute just to assure themselves that they
> have nothing to do.  This is inefficient, especially for battery-powered
> devices.

OK.

Such applications might be better served via a wake-me-at-this-time
syscall instead of a sleep-me-for-this-long syscall.  Although such a
thing is less general.



Is sysfs the right interface for this thing?  Bear in mind that
CONFIG_SYSFS does exist.  

> +		     fd = open("/sys/kernel/time_notify", O_WRONLY);
> +		     fdprintf(fd, "%d 1 0 1 1", efd);

why not

		sys_time_notify(efd, 1, 0, 1, 1);

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