From: Jesse Pollard <pollard@tomcat.admin.navo.hpc.mil>
To: jsimmons@transvirtual.com, Jesse Pollard <jesse@cats-chateau.net>
Cc: Tim Jansen <tim@tjansen.de>, linux-kernel@vger.kernel.org
Subject: Re: The new X-Kernel !
Date: Mon, 22 Oct 2001 12:56:22 -0500 (CDT) [thread overview]
Message-ID: <200110221756.MAA08417@tomcat.admin.navo.hpc.mil> (raw)
James Simmons <jsimmons@transvirtual.com>:
> > On Sunday 21 October 2001 14:17, Tim Jansen wrote:
> > > On Sunday 21 October 2001 19:40, James Simmons wrote:
> > > > It sets the hardware state of the keyboards and the
> > > > mice. The user runs apps that alter the state. The second user comes
> > > > along and log in on desktop two. He runs another small application to
> > > > test the mice. It changes the state which in turn effects the person on
> > > > desktop one.
> > >
> > > Isn't this a driver problem? If two processes can interfere when using the
> > > same device the driver should only allow one access (one device file
> > > opened) at a time. And if two processes need to access it it should be
> > > managed by a daemon.
> >
> > Neither - It is a resource allocation problem, which all UNIX style systems
>
> [snip]...
>
> I think everyone has misunderstood me. I know I'm not the most clear
> person sometimes. I'm just talking about fine grain locking of some kind
> between input devices. I really like to see "direct input" in OpenGL
> someday. You need some kind of locking between OpenGL and the X server in
> this case just like you have with graphics.
I may not have been complete -
Your initial example was of a force feedback mouse (or data glove), where
the process that has the device open dies.
Between the process failure, some other process (not owned by the same user)
may modify characteristics of the device in an inappropriate way. Then the
original user starts using it again.
Resource allocation requires the device to be initialized to a base, known
state. That state MUST NOT be modified by session other than the one that
allocated it. The driver may or may not be currently "open" by a process.
It is a security violation to leak state information or to have that state
information modified by any but the owner of that state.
Some "devices" (like the Xserver is a device), already do this. If the
attached allocator (the X login) becomes inoperable (X server dies), then
the state of the device is reset (logged out), and allocation of the "device"
reclaimed (logged out in this case). All physical devices associated with
the X server must also be reset (mouse/keyboard/frame buffer...).
Resource allocation is easier to visualize when it is a tape drive.
The actions of a resource allocator must/should be:
1. initialize the resource/device to a known state.
2. control access to the resource/device (prevent access).
3. be able to grant access to the resource/device to user sessions.
4. prevent multiple sessions from accessing the resource/device
simultaneously.
5. reclaim the resource/device (abort all outstanding access) and
return to step 1.
Some procedure (as outlined, though not complete) would prevent your
"state" misconfiguration where multiple users had access to a single user
resource (tape, mouse, keyboard, data glove, etc).
I've already had to deal with "inadvertant" use of state information leaking
across sessions (audio devices). Personally, I think it is time for a resource
management system.
-------------------------------------------------------------------------
Jesse I Pollard, II
Email: pollard@navo.hpc.mil
Any opinions expressed are solely my own.
next reply other threads:[~2001-10-22 17:56 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-22 17:56 Jesse Pollard [this message]
[not found] <fa.fbu5gjv.1526gp4@ifi.uio.no>
[not found] ` <fa.ltbaijv.13jgcr7@ifi.uio.no>
2001-10-22 1:14 ` Dan Maas
2001-10-22 8:09 ` Alan Cox
-- strict thread matches above, loose matches on Subject: below --
2001-10-21 21:44 Samium Gromoff
2001-10-21 22:01 ` Gábor Lénárt
2001-10-20 21:30 MichaelM
2001-10-20 21:43 ` Mike Fedyk
2001-10-21 0:08 ` Aaron Lehmann
2001-10-21 7:37 ` Gábor Lénárt
2001-10-21 12:54 ` Tim Jansen
2001-10-21 15:37 ` john slee
2001-10-21 19:04 ` Tim Jansen
2001-10-21 20:03 ` Gábor Lénárt
2001-10-21 21:22 ` Federico Sevilla III
2001-10-21 21:31 ` Gábor Lénárt
2001-10-21 21:38 ` Sean Cavanaugh
2001-10-21 21:52 ` Alan Cox
2001-10-21 22:39 ` Oden Eriksson
2001-10-22 4:44 ` Sean Cavanaugh
2001-10-21 21:53 ` Gábor Lénárt
2001-10-21 22:14 ` Leo Spalteholz
2001-10-22 5:17 ` Jonathan Morton
2001-10-21 16:09 ` Malcolm H. Teas
2001-10-21 19:04 ` Tim Jansen
2001-10-21 19:13 ` Bernd Eckenfels
2001-10-21 19:30 ` Gábor Lénárt
2001-10-21 19:49 ` J Sloan
2001-10-21 21:12 ` Tim Jansen
2001-10-21 21:20 ` D. Stimits
2001-10-21 21:41 ` Gábor Lénárt
2001-10-21 8:33 ` Jonathan Morton
2001-10-21 8:50 ` Gábor Lénárt
2001-10-21 9:13 ` Jonathan Morton
2001-10-21 17:06 ` James Simmons
2001-10-21 10:26 ` Allan Sandfeld
2001-10-21 14:19 ` Alan Cox
2001-10-21 17:18 ` James Simmons
2001-10-21 17:26 ` Alan Cox
2001-10-21 17:40 ` James Simmons
2001-10-21 19:17 ` Tim Jansen
2001-10-22 0:10 ` Jesse Pollard
2001-10-22 0:37 ` Tim Jansen
2001-10-22 17:18 ` James Simmons
2001-10-22 16:51 ` James Simmons
2001-10-22 18:35 ` Tim Jansen
2001-10-23 7:05 ` Allan Sandfeld
2001-10-21 19:53 ` Gábor Lénárt
2001-10-22 17:04 ` James Simmons
2001-10-23 6:45 ` Albert D. Cahalan
2001-10-22 5:42 ` Dwayne C. Litzenberger
2001-10-31 17:34 ` Jim Freeman
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=200110221756.MAA08417@tomcat.admin.navo.hpc.mil \
--to=pollard@tomcat.admin.navo.hpc.mil \
--cc=jesse@cats-chateau.net \
--cc=jsimmons@transvirtual.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tim@tjansen.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome