Re: RTC wakealarm write-only, still has 644 permissions

2007-12-02 Thread David Brownell
On Sunday 02 December 2007, Pavel Machek wrote: > Anyway, with wildcarded dates, no-clobber is a problem -- because you > need to kill the alarm after you waken up, or it will repeat. And I've started to fix that problem. Alarms need to act only in oneshot mode for other reasons too. - Dave -- T

Re: RTC wakealarm write-only, still has 644 permissions

2007-12-02 Thread Pavel Machek
Hi! > > > It's not an issue of accidental writes, it's an issue of there being > > > no other synchronization for setting those alarms. Remember that both > > > RTC_WKALM_SET and RTC_ALM_SET ioctls can set that same alarm, and so > > > could a different userspace activity ... > > > > We have 3 i

Re: RTC wakealarm write-only, still has 644 permissions

2007-11-30 Thread Pavel Machek
On Fri 2007-11-30 16:20:58, Mark Lord wrote: > David Brownell wrote: >> On Friday 30 November 2007, Pavel Machek wrote: It's not an issue of accidental writes, it's an issue of there being no other synchronization for setting those alarms. Remember that both RTC_WKALM_SET and RTC_AL

Re: RTC wakealarm write-only, still has 644 permissions

2007-11-30 Thread Mark Lord
David Brownell wrote: On Friday 30 November 2007, Pavel Machek wrote: It's not an issue of accidental writes, it's an issue of there being no other synchronization for setting those alarms. Remember that both RTC_WKALM_SET and RTC_ALM_SET ioctls can set that same alarm, and so could a different

Re: RTC wakealarm write-only, still has 644 permissions

2007-11-30 Thread David Brownell
On Friday 30 November 2007, Pavel Machek wrote: > > > > It's not an issue of accidental writes, it's an issue of there being > > no other synchronization for setting those alarms. Remember that both > > RTC_WKALM_SET and RTC_ALM_SET ioctls can set that same alarm, and so > > could a different use

Re: RTC wakealarm write-only, still has 644 permissions

2007-11-30 Thread Pavel Machek
Hi! > > rtc-sysfs.c: why this? > > > > if (alarm > now) { > > /* Avoid accidentally clobbering active alarms; we can't > > * entirely prevent that here, without even the minimal > > * locking from the /dev/rtcN api. > > */

Re: RTC wakealarm write-only, still has 644 permissions

2007-11-29 Thread Alessandro Zummo
On Thu, 29 Nov 2007 10:10:12 -0800 David Brownell <[EMAIL PROTECTED]> wrote: > > I think the right thing to do there is just insist that in the RTC > framework, alarms should always follow the one-shot model. /me agrees. -- Best regards, Alessandro Zummo, Tower Technologies - Torino, It

Re: RTC wakealarm write-only, still has 644 permissions

2007-11-29 Thread David Brownell
On Wednesday 28 November 2007, Pavel Machek wrote: > > Are you sure it's not working? Other than the two issues I noted > > above -- borkage w.r.t. ACPI (which wasn't necessarily shown in your > > scripts above), and with wildcarding -- it looked to be correct. > > It seems to be working now, not

Re: RTC wakealarm write-only, still has 644 permissions

2007-11-29 Thread Tino Keitel
On Thu, Nov 29, 2007 at 00:26:47 +0100, Pavel Machek wrote: [...] > > > Also, is there some documentation for wakealarm? > > > > "git show 3925a5ce44330767f7f0de5c58c6a797009f0f75" has some. > > Thanks. Will put it into Doc*/rtc.txt. It would be nice if you mention the differences to the old /

Re: RTC wakealarm write-only, still has 644 permissions

2007-11-28 Thread Pavel Machek
Hi! Sorry for long delay. I got rtc wakeup to work... once per boot. On 2.6.24-rc3. > > > [EMAIL PROTECTED]:/sys/class/rtc/rtc0# ls -al wakealarm > > > -rw-r--r-- 1 root root 0 Sep 20 12:30 wakealarm > > > [EMAIL PROTECTED]:/sys/class/rtc/rtc0# cat wakealarm > > > [EMAIL PROTECTED]:/sys/class/

Re: RTC wakealarm write-only, still has 644 permissions

2007-11-28 Thread Pavel Machek
Hi! > rtc-sysfs.c: why this? > > if (alarm > now) { > /* Avoid accidentally clobbering active alarms; we > can't > * entirely prevent that here, without even the > minimal > * locking from the /dev/rtcN api. > */ >

Re: RTC wakealarm write-only, still has 644 permissions

2007-10-02 Thread David Brownell
> > > > [EMAIL PROTECTED]:/sys/class/rtc/rtc0# cat wakealarm > > > > [EMAIL PROTECTED]:/sys/class/rtc/rtc0# echo 132719 > wakealarm > > > > At which point I'd expect > > > > # echo $? > > > > would indicate the write failed. That's a LONG time in the > > past (January 2, 1970), so that settin

Re: RTC wakealarm write-only, still has 644 permissions

2007-10-02 Thread Pavel Machek
Hi! > > > ...should they be changed to 200? Or perhaps file should be readable? > > No, mode 644 is fine. No reason to prevent "other" people from > reading the alarm time (is there?) and if you write a legal value, > that will work. So $SUBJECT is no problem at all. Yep, agreed. I was confuse

Re: RTC wakealarm write-only, still has 644 permissions

2007-09-21 Thread David Brownell
On Thursday 20 September 2007, Pavel Machek wrote: > Hi! > > > ...should they be changed to 200? Or perhaps file should be readable? No, mode 644 is fine. No reason to prevent "other" people from reading the alarm time (is there?) and if you write a legal value, that will work. So $SUBJECT is n

Re: RTC wakealarm write-only, still has 644 permissions

2007-09-20 Thread Pavel Machek
Hi! > ...should they be changed to 200? Or perhaps file should be readable? > > [EMAIL PROTECTED]:/sys/class/rtc/rtc0# cat wakealarm > [EMAIL PROTECTED]:/sys/class/rtc/rtc0# echo 132719 > wakealarm > [EMAIL PROTECTED]:/sys/class/rtc/rtc0# ls -al wakealarm > -rw-r--r-- 1 root root 0 Sep 20 12:3

RTC wakealarm write-only, still has 644 permissions

2007-09-20 Thread Pavel Machek
...should they be changed to 200? Or perhaps file should be readable? [EMAIL PROTECTED]:/sys/class/rtc/rtc0# cat wakealarm [EMAIL PROTECTED]:/sys/class/rtc/rtc0# echo 132719 > wakealarm [EMAIL PROTECTED]:/sys/class/rtc/rtc0# ls -al wakealarm -rw-r--r-- 1 root root 0 Sep 20 12:30 wakealarm [EMAI