I moved this to a new thread. I'd also like to ask everyone to help with this. I don't want to accidentally introduce a security hole; the more eyes looking at the code the less likely that will be.
On 6/17/05, Adam Jackson <[EMAIL PROTECTED]> wrote: > drmAddMap has to be root-only because it's mapping device memory into > userspace (can trigger bus-master writes, blah blah, root escalation). I > think that's the only one that _really_ needs it, and to be honest those > mappings should get set up from the DRM side anyway and AddMap should just > die. I put code into radeon CVS for something I was calling permanent maps. When the driver loads it uses an internal call, initmap() to preload the maps for framebuffer and the registers. That allows you to avoid the AddMap calls for those two. I believe the via driver has picked up initmap too. Dave says initmap is already in the queue for kernel and should be landing shortly. Access to the registers is something that should require root priv right? Once I can get to the registers I can program them to contol the DMA hardware and then muck with the kernel's memory and escalate my priveldge level. EGL avoids this possible hole by not using the registers from user space. My solution would be to leave the permament maps visible and then add a root capability check when someone attempts to drmMap the registers. It would more complex to try and hide the map from GetMap. I haven't gotten to where I need to AddMap sarea. Can we prebuild a permanent map for it too? Right now I'm blocked on the AuthMagic call needing root. -- Jon Smirl [EMAIL PROTECTED] ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click -- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel