All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Greg KH <greg@kroah.com>,
	Lennart Poettering <lennart@poettering.net>,
	Werner Fink <werner@suse.de>, Jiri Slaby <jslaby@suse.cz>
Subject: Re: tty: add 'active' sysfs attribute to tty0 and console device
Date: Tue, 16 Nov 2010 22:29:11 +0100	[thread overview]
Message-ID: <AANLkTik3fdR4zzKq29THQjpW5sNoqFEQsq9vevF6diUi@mail.gmail.com> (raw)
In-Reply-To: <20101116204906.29d840e9@lxorguk.ukuu.org.uk>

On Tue, Nov 16, 2010 at 21:49, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>> > Stuff never stops changing until the machine shuts down, its undefined.
>>
>> Either you don't, or you just don't want to understand what all this
>> is about. :)
>
> At what point do you think the current tty stops changing ? The only
> cases I can think of are shutdown, and when your own processes locks vt
> changes.

Hmm, what do you mean? It's not the tty IO. It's only the VT switch,
and this changes only when someone actually does the switch, like
pressing Alt-F1,F2,...

>> > Except that it doesn't address things like the permissions side of things.
>> >
>> > NAK again
>>
>> Specifics please.
>
> /dev/tty* and sysfs nodes don't track permissions, owner with each other,
> so you are providing interfaces that either expose information they
> shouldn't (which screen is valuable info in some environments), or don't
> expose info they should.
>
> sysfs also lacks vhangup so you can't fix it right now either.

You think exposing the currently active VC is security relevant? We
don't expose anything from the VC itself. We have this information all
over the place in userspace. What exactly you think is the problem
here?

>> > "We have an interface that doesn't quite work for our case and we think
>> > that is a bug" is not the reasoning behind writing a new random one with
>> > a totally disconnected permission model that doesn't work either.
>> >
>> > Fix the one we have.
>>
>> So how do you think you'll fix it? I better don't get into your
>> ioctl() business.
>
> Start by explaining why the current interface doesn't work for you, but
> in detail.

The sleeping ioctl() requires a dedicated thread in a service. Now we
wake up and all the stuff that happens now is lost, so we have to
check with another ioctl(), between this ioctl() and going to sleep
again is a window we don't cover, we just go to sleep, even when
something has happened. Poll() solves that by queuing the notification
until it's retrieved.

Kay

  reply	other threads:[~2010-11-16 21:29 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-16 15:46 tty: add 'active' sysfs attribute to tty0 and console device Kay Sievers
2010-11-16 15:57 ` Alan Cox
2010-11-16 16:13   ` Kay Sievers
2010-11-16 17:14     ` Alan Cox
2010-11-16 18:51       ` Kay Sievers
2010-11-16 19:55         ` Alan Cox
2010-11-16 20:15           ` Kay Sievers
2010-11-16 20:49             ` Alan Cox
2010-11-16 21:29               ` Kay Sievers [this message]
2010-11-16 21:42               ` Lennart Poettering
2010-11-16 22:51                 ` Alan Cox
2010-11-16 22:58                   ` Lennart Poettering
2010-11-16 23:04                     ` Alan Cox
2010-11-16 23:18                       ` Lennart Poettering
2010-11-16 23:49                         ` Etched Pixels
2010-11-16 21:36           ` Lennart Poettering
2010-11-16 22:56             ` Alan Cox
2010-11-16 23:10               ` Lennart Poettering
2010-11-16 23:45                 ` Alan Cox
2010-11-17 16:31                 ` John Stoffel
2010-11-17 22:01                 ` Valdis.Kletnieks
2010-11-17 23:40                   ` Kay Sievers
2010-11-17 23:56                     ` Alan Cox
2010-11-18  1:27                       ` Greg KH
2010-11-18  1:48                         ` Lennart Poettering
2010-11-18  1:53                           ` Greg KH
2010-11-18  2:29                             ` Lennart Poettering
2010-11-18 11:00                             ` Dr. Werner Fink
2010-11-18 11:23                               ` Alan Cox
2010-11-18 12:12                                 ` Dr. Werner Fink
2010-11-18 12:58                                   ` Alan Cox
2010-11-18 13:14                                     ` Dr. Werner Fink
2010-11-18 14:41                                       ` Alan Cox
2010-11-19 13:21                                         ` Dr. Werner Fink
2010-11-19 15:47                                           ` Alan Cox
2010-11-19 17:07                                             ` Dr. Werner Fink
2010-11-19 18:02                                             ` Greg KH
2010-11-19 18:41                                               ` Dr. Werner Fink
2010-11-20 12:40                                                 ` Alan Cox
2010-12-01 11:15                                                   ` Dr. Werner Fink
2010-11-18 12:04                               ` Kay Sievers
2010-11-18 10:15                         ` Alan Cox
2010-11-18 11:55                           ` Kay Sievers
2010-11-18 13:01                             ` Alan Cox
     [not found] <20101201112004.12d78cd7@lxorguk.ukuu.org.uk>
2010-12-01 12:32 ` Dr. Werner Fink
     [not found]   ` <tiocgdev1@mdm.bga.com>
2010-12-03 11:48     ` Dr. Werner Fink

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=AANLkTik3fdR4zzKq29THQjpW5sNoqFEQsq9vevF6diUi@mail.gmail.com \
    --to=kay.sievers@vrfy.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=greg@kroah.com \
    --cc=jslaby@suse.cz \
    --cc=lennart@poettering.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=werner@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.