Direct video ram access

Jon Tombs (jon@gte.esi.us.es)
Wed, 8 Nov 1995 17:12:11 +0100 (MET)


Hi all

I am almost at the point submitting for the XFree86-3.next XVidmode-extension
a patch that gives the ability of an X app to gain direct access to the video
ram.

So far I have a pre release working which Dave Taylor of Id likes, but it has
one inconvenience, the client needs to run setuid root in order to mmap
/dev/mem. How can we get remove this? A few ideas come to mind.

- Wait for file descriptor passing in linux - but how do we avoid the security
hole that passing /dev/mem would present.

- Add support to the SYSV shared mem to allow sharing of mmapped regions -
is this hard?, is it currently even possible?

- Add a root only ioctl to /dev/vc to set the framebuffer size and offset.
mmap of /dev/vc returns this memory. - Sounds fairly easy, would Linus
and other kernel hackers accept such a feature?

Advise and/or further suggestions please.

-- 
Jon. <jon@gte.esi.us.es, http://www.esi.us.es/~jon>