[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: [rtl] using RTLinux for video stream handling
Zdenek Kabelac <kabi@fi.muni.cz> writes:
> Corey Minyard wrote:
> > This is not true. X is a user space processes, but it is possible for
> > user space processes to disable interrupts. I have personally done
> > it. You have to modify your iopl and you have to be a supervisor
> > process, but you can do it. And some X servers do this, I'm pretty
> > sure. I know they go directly to the hardware.
> >
> > And since X directly calls the cli and sti instructions instead of
> > calling the Linux functions in the kernel, even RTLinux cannot stop
> > this.
>
> Are you sure, the non-kernel-space process could use STI & CLI
> instructions ??? I've always though this is privileged instruction
> and there is no way, user-space program could use them.
>
> (This would break whole multitasking, and we are not on Amiga)
I am 100% sure. Try the following (as root):
iopl(3)
asm("cli");
asm("sti");
It will work just fine. You can try adding an infinite loop after
the "cli", but it's the reset button after that happens :-). You
can also do direct port I/O (inb, outb, etc.).
It only breaks multitasking if you use it and only root is allowed to
do it, so it's not a security hazard. Your average program shouldn't
be doing this.
--
Corey Minyard Internet: minyard@acm.org
Work: minyard@nortel.ca UUCP: minyard@wf-rch.cirr.com
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail majordomo@rtlinux.cs.nmt.edu OR
echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.cs.nmt.edu
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/