On Friday 17 June 2005 23:18, Ian Romanick wrote: > Adam Jackson 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 agree 100%. In fact, most of my recent work to enable DRI on PCI > Matrox cards focused on exactly that. The code in mga_do_dma_bootstrap > (and friends) is a good model (IM-not-so-HO!) for where the other DRMs > should go.
Cool, I'll look into that for the imagine driver. > Basically, user-mode should say to the kernel, "Please initialize > yourself with these tunable parameters." The kernel should then do > whatever it wants and let user-mode know what it did. Actually right after I said that I remembered that drmAddMap is also used to set up the SAREA. So, maybe it shouldn't die, but I don't think it should need to do anything besides the DRM_SHM mappings, and those can be done without needing root. - ajax
pgp0ewawrIrAa.pgp
Description: PGP signature