linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Lord <lkml@rtr.ca>
To: David Brownell <david-b@pacbell.net>
Cc: Pavel Machek <pavel@ucw.cz>,
	rtc-linux@googlegroups.com,
	kernel list <linux-kernel@vger.kernel.org>,
	Alessandro Zummo <alessandro.zummo@towertech.it>
Subject: Re: RTC wakealarm write-only, still has 644 permissions
Date: Fri, 30 Nov 2007 16:20:58 -0500	[thread overview]
Message-ID: <47507EBA.6070801@rtr.ca> (raw)
In-Reply-To: <200711301310.40360.david-b@pacbell.net>

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 userspace activity ...
>> We have 3 interfaces to one hardware resource. I do not think kernel
>> should try to arbitrate it here. There's just one alarm clock with
>> three interfaces.
> 
> Having three interfaces is bad enough ... ensuring that none of
> them can ever be used safely would be stupid.
> 
> 
>>> As written, this allows one userspace activity to clobber another if
>>> it does so explicitly, by first disabling the other one and then
>>> setting its own alarm.  But the idea is to minimize "accidents" like
>>> unintentionally clobbering an alarm set by someone else.
>> Well, I could not get it to work with this "avoid-clobber" feature.
> 
> I had earlier pointed out a different issue, whereby "oneshot"
> semantics weren't consistently followed.  I've been working on
> some patches to address that.  The ACPI bits still need work,
> but I'll forward one part soonish.
> 
> 
>>>> If I remove "accidental alarm modify" logic, I can actually use rtc to
>>>> wake up more than once per boot.
>>> Evidently the alarm isn't being disabled then...
> 
>     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> That's the issue addressed by those patches.  (Specific to rtc-cmos,
> not to RTCs on saner hardware.)
> 
> 
>> I think we should just remove the 'avoid-clobber' logic. If userland
>> wants to somehow arbitrate access, it can.
> 
> Pray tell, *HOW* could it arbitrate?
...

This is really a non-issue in practice.  The thing requires root access,
and there's only a single user at most for it on a given system.

This is used by media boxes to power off (or suspend) between recording times.
And similar stuff.

It might be nice to fix it all, but the current state really isn't hurting anything.

Cheers

  reply	other threads:[~2007-11-30 21:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-20 10:32 RTC wakealarm write-only, still has 644 permissions Pavel Machek
2007-09-20 10:50 ` Pavel Machek
2007-09-22  5:38   ` David Brownell
2007-10-02  9:36     ` Pavel Machek
2007-10-03  2:15       ` David Brownell
2007-11-28 23:26     ` Pavel Machek
2007-11-29  8:02       ` Tino Keitel
2007-11-29 18:10       ` David Brownell
2007-11-29 18:14         ` Alessandro Zummo
2007-11-30 20:35         ` Pavel Machek
2007-11-30 21:10           ` David Brownell
2007-11-30 21:20             ` Mark Lord [this message]
2007-11-30 21:27               ` Pavel Machek
2007-12-02 11:36             ` Pavel Machek
2007-12-02 16:03               ` David Brownell
     [not found]     ` <20071128230451.GA1547@elf.ucw.cz>
2007-11-28 23:26       ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47507EBA.6070801@rtr.ca \
    --to=lkml@rtr.ca \
    --cc=alessandro.zummo@towertech.it \
    --cc=david-b@pacbell.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rtc-linux@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).