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] [day] [month] [year] [list]
Date:	Wed, 18 Sep 2013 08:25:00 -0500
From:	John Stultz <john.stultz@...aro.org>
To:	Linus Walleij <linus.walleij@...aro.org>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Alessandro Zummo <a.zummo@...ertech.it>,
	"Jon Medhurst (Tixy)" <tixy@...aro.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [RFC][PATCH] rtc: rtc-pl031: Set wakeup flag prior to registering rtcdev

On Wed, Sep 18, 2013 at 6:30 AM, Linus Walleij <linus.walleij@...aro.org> wrote:
>
> On Tue, Sep 17, 2013 at 8:29 PM, John Stultz <john.stultz@...aro.org> wrote:
>
> > In some recent testing, I noticed the CLOCK_REALTIME_ALARM clockid
> > wasn't functioning on my vexpress qemu environment. Looking into it
> > I noticed the pl031 rtc driver doesn't set the wakeup flag on the
> > device until after registering the device with the RTC subsystem.
> >
> > This causes the alarmtimer subsystem to not see the pl031 driver
> > as a valid backing device, and that resuls in alarm clockids
> > getting ENOTSUPP errors.
> >
> > Thus be sure to set the wakeup flag on the device prior to
> > registering the rtcdev so the pl031 rtc driver can be used as
> > the backing alarmtimer device.
> >
> > Let me know if you have any feedback or objections to this.
> > If it looks ok, I'll queue it for 3.13. I suspect there
> > may be other RTC drivers with the same problem.
> >
> > Cc: Linus Walleij <linus.walleij@...aro.org>
> > Cc: Alessandro Zummo <a.zummo@...ertech.it>
> > Cc: "Jon Medhurst (Tixy)" <tixy@...aro.org>
> > Cc: linux-arm-kernel@...ts.infradead.org
> > Signed-off-by: John Stultz <john.stultz@...aro.org>
>
> Makes perfect sense. I have only tested the driver from regular
> userspace using ioctl()s. Is these a simple way to test
> an alarmtimer on a barebones system?

The easiest way is to try to read CLOCK_REALTIME_ALARM which will only
function if there's a backing rtc.

I've got some further timekeeping tests here that will test timers etc
on the _ALARM clockids:
https://github.com/johnstultz-work/timetests


> Acked-by: Linus Walleij <linus.walleij@...aro.org>
>
> Are you sure this should not be for -rc:s and stable?

Its not a regression (never worked before), so I don't think so,
unless someone finds the functionality critical for long-term kernels.

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