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, 25 Jul 2006 14:22:08 -0400
From:	Neil Horman <nhorman@...driver.com>
To:	Arjan van de Ven <arjan@...radead.org>
Cc:	linux-kernel@...r.kernel.org, a.zummo@...ertech.it,
	jg@...edesktop.org
Subject: Re: [PATCH] RTC: Add mmap method to rtc character driver

On Tue, Jul 25, 2006 at 07:55:39PM +0200, Arjan van de Ven wrote:
> > @@ -265,6 +269,7 @@ irqreturn_t rtc_interrupt(int irq, void 
> >  
> >  	kill_fasync (&rtc_async_queue, SIGIO, POLL_IN);
> >  
> > +	*count_ptr = (*count_ptr)++;
> 
> Hi,
> 
> it's a cute idea, however 3 questions:
> 1) you probably want to add a few memory barriers around this, right?
Actually, I was curious about that.  I had initially planned on using xchg to
update the counter on the mmaped page, but then it occured to me that an
unsigned long would always be an atomic update (or so I thought).  Is there a
case in which userspace will read a munged value the way the code is now?

> 2) why use the rtc and not the regular timer interrupt?
> 
Honestly, because it seemed to be a quick way forward.  The real time clock
driver was there, and its infrastructure lent itself rather easily toward adding
this functionality.  If you can elaborate on a better suggestion, I'll happily
take a crack at it.

> (and 
> 3) this will negate the power gain you get for tickless kernels, since
> now they need to start ticking again ;( )
> 
That is true, but only in the case where someone opens up /dev/rtc, and if they
open that driver and send it a UIE or PIE ioctl, it will start ticking
regardless of this patch (or that is at least my impression).

Regards
Neil

> Greetings,
>    Arjan van de Ven
> 
> -
> 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/

-- 
/***************************************************
 *Neil Horman
 *Software Engineer
 *gpg keyid: 1024D / 0x92A74FA1 - http://pgp.mit.edu
 ***************************************************/
-
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