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:	Tue, 22 Feb 2011 20:00:46 +0000
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	john stultz <johnstul@...ibm.com>
Cc:	rtc-linux@...glegroups.com, LKML <linux-kernel@...r.kernel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Alessandro Zummo <a.zummo@...ertech.it>,
	Marcelo Roberto Jimenez <mroberto@...i.cetuc.puc-rio.br>
Subject: Re: [rtc-linux] [PATCH 04/10] RTC: Cleanup
	rtc_class_ops->read_alarm()

On Tue, Feb 22, 2011 at 11:51:08AM -0800, john stultz wrote:
> On Tue, 2011-02-22 at 10:16 -0800, Mark Brown wrote:

> > The WM83xx RTCs can do this (the alarm can be used to initiate a boot)
> > and I'd expect many embedded RTC controllers can do similar.  The
> > application would manage this by owning the RTC in the system, usually
> > with a configuration saying something like "boot every day at 7am" or
> > something.

> So since the RTC_ALM_SET doesn't support wildcards, the application
> would be checking the hardware at least once a day and making sure the
> alarm was properly set for 7am?

Probably, yes.  Though some RTCs just ignore the day anyway.

> Does the approach I mentioned in my last mail to Marcelo sound like a
> reasonable solution?

> Basically: The kernel will try to init the value returned from
> RTC_ALM_READ to whatever the hardware has stored, but since many (very
> common) rtc devices don't support persistent values after reset,
> applications shouldn't trust that alarms will persist across resets.

That'll probably work, yes.

> > Having thought about this a bit I'm thinking that this sort of alarm
> > handling is probably something I'd expect to see handled in userspace.
> > I can see us providing a virtual RTC driver that can generate alarms
> > when there's no actual RTC hardware but adding additional functionality
> > on top of the hardware feels like an application issue.

> If you're suggesting that the multiplexing of RTC events doesn't belong
> in the kernel, and instead should be handled through userland
> coordination, then I disagree. The kernel's job is explicitly to
> abstract the hardware so that resources can be shared safely. So
> abstracting the RTC alarms doesn't seem to be overreaching. But maybe
> I'm misunderstanding what your saying?

I'm saying that for something like this it doesn't seem like the kernel
should be adding support for features that the hardware doesn't actually
have, it feels like it's going to be more complicated and error prone to
implement in kernel space.
--
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