Re: Removing the root priv requirement from DRM

2005-06-20 Thread Adam Jackson
On Monday 20 June 2005 00:03, Jon Smirl wrote: On 6/18/05, Adam Jackson [EMAIL PROTECTED] wrote: Obviously determining which sets of registers can be mapped through the drm is a card-by-card problem. Different cards have different register maps, by definition. But the DRI drivers work as

Re: Removing the root priv requirement from DRM

2005-06-20 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jon Smirl wrote: On 6/18/05, Adam Jackson [EMAIL PROTECTED] wrote: On Saturday 18 June 2005 15:22, Jon Smirl wrote: On 6/18/05, Adam Jackson [EMAIL PROTECTED] wrote: The point to notice here is that these registers generally segmented apart in the

Re: Removing the root priv requirement from DRM

2005-06-20 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Nicolai Haehnle wrote: I don't see any reason for mapping registers into userspace in the first place. Except for mode setting and related setup tasks (which aren't exactly performance critical), you'll never want to write to registers

Re: Removing the root priv requirement from DRM

2005-06-20 Thread Alan Cox
On Sad, 2005-06-18 at 23:30, Adam Jackson wrote: The issue is that drmAddMap, the function that sets up these maps, is currently run from the server during DDX bringup. These maps can just as easily be created during DRM init - and as a design issue, probably _should_ be created there.

Re: Removing the root priv requirement from DRM

2005-06-20 Thread Alan Cox
On Sad, 2005-06-18 at 20:22, Jon Smirl wrote: Then this is a card by card problem. If user space needs to get to the registers, and we can't split the safe registers from the unsafe (security issues) ones, then the user space drivers also needs to run as root. Incorrect. See the via driver.

Re: Removing the root priv requirement from DRM

2005-06-20 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Alan Cox wrote: On Sad, 2005-06-18 at 23:30, Adam Jackson wrote: The issue is that drmAddMap, the function that sets up these maps, is currently run from the server during DDX bringup. These maps can just as easily be created during DRM init -

Re: Removing the root priv requirement from DRM

2005-06-20 Thread Jon Smirl
On 6/20/05, Ian Romanick [EMAIL PROTECTED] wrote: The problem with the SAREA is that user-mode can request an SAREA *larger* than the kernel knows about. For example, the user-mode drivers can add extra fields for the DDX and client-side drivers to communicate. The kernel doesn't need to

Re: Removing the root priv requirement from DRM

2005-06-20 Thread Thomas Hellström
Ian Romanick wrote: The problem with the SAREA is that user-mode can request an SAREA *larger* than the kernel knows about. For example, the user-mode drivers can add extra fields for the DDX and client-side drivers to communicate. The kernel doesn't need to know anything about what's in

Re: Removing the root priv requirement from DRM

2005-06-19 Thread Jon Smirl
On 6/18/05, Adam Jackson [EMAIL PROTECTED] wrote: On Saturday 18 June 2005 15:22, Jon Smirl wrote: On 6/18/05, Adam Jackson [EMAIL PROTECTED] wrote: The point to notice here is that these registers generally segmented apart in the card's memory map. If all those trigger regs are within a

Removing the root priv requirement from DRM

2005-06-18 Thread Jon Smirl
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

Re: Removing the root priv requirement from DRM

2005-06-18 Thread Adam Jackson
On Saturday 18 June 2005 11:20, Jon Smirl wrote: 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

Re: Removing the root priv requirement from DRM

2005-06-18 Thread Jon Smirl
On 6/18/05, Adam Jackson [EMAIL PROTECTED] wrote: On Saturday 18 June 2005 11:20, Jon Smirl wrote: 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

Re: Removing the root priv requirement from DRM

2005-06-18 Thread Adam Jackson
On Saturday 18 June 2005 15:22, Jon Smirl wrote: On 6/18/05, Adam Jackson [EMAIL PROTECTED] wrote: The point to notice here is that these registers generally segmented apart in the card's memory map. If all those trigger regs are within a single 4k range, then that's the only range you