Re: kill -9 <pid of X>

Alan Cox (alan@lxorguk.ukuu.org.uk)
Sun, 16 Aug 1998 20:50:49 +0100 (BST)


> > The bigger problems are that X11 is subject to being killed with sig 9
> > (which with a horrible kernel hack can be blocked for iopl3 processes)
>
> Is that so horrible? If X is going to bang hardware like kernel code,
> it may as well act like kernel code.

kernel code doesnt get pre-empted without warning, killed due to
lack of memory and other stuff. Its a more controlled space.

> > not that big a deal - a setuid "sak signal" ioctl akin to the way you
> > take over console switching covers it.
>
> Yes, as long as X won't let a user remap SAK.

X shouldnt be capable of remapping SAK

> > I'd agree however - you don't need to put all mode switching code in
> > kernel if you allow iopl3 proceses to lock out sig 9 and you provide
> > a sak hook. Oom should be solvable its just harder
>
> Oom is easy: mlockall()

Bad luck X11 is designed to make good use of the paging. mlockall does
work for Linus suggested mode changing daemon

> If X is going to play with hardware, then mlockall() is simply the
> correct solution. X already disables interrupts sometimes. X can use
> DMA too then, though a system call to get physical addresses would help.

You can't DMA to user space. To do that right is hard. Linus turned down
a couple of "almost right" patches for 2.1.x so until 2.3.x if you want
DMA you gotta be in the kernel.

Alan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html