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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 25 Jul 2006 21:31:32 +0200
From:	Segher Boessenkool <segher@...nel.crashing.org>
To:	Neil Horman <nhorman@...driver.com>
Cc:	"H. Peter Anvin" <hpa@...or.com>, linux-kernel@...r.kernel.org,
	a.zummo@...ertech.it, jg@...edesktop.org
Subject: Re: [PATCH] RTC: Add mmap method to rtc character driver

>> Not really.  This introduces a potentially very difficult support
>> user-visible interface.  Consider a tickless kernel -- you might  
>> end up
>> taking tick interrupts ONLY to update this page, since you don't have
>> any way of knowing when userspace wants to look at it.
>>
> Well, you do actually know when they want to look at it.  The rtc  
> driver only
> unmasks its interrupt when a user space process has opened the  
> device and sent
> it a RTC_UIE ON or RTC_PIE_ON (or other shuch ioctl).  So if you  
> open /dev/rtc,
> and memory map the page, but never enable a timer method, then  
> every read of the
> page returns zero.  The only overhead this patch is currently  
> adding, execution
> time-wise is the extra time it takes to write to a the shared page  
> variable.  If
> the timer tick interrupt is executing, its because someone is  
> reading tick data,
> or plans to very soon.

But userland cannot know if there is a more efficient option to
use than this /dev/rtc way, without using VDSO/vsyscall.


Segher

-
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