On 6/29/05, Thomas Hellström <[EMAIL PROTECTED]> wrote:
> > Currently the drivers are AddMap'ing multiple little maps over the AGP
> > area, but the area is basically split into two area: private for the
> > master and public for the DRI clients to write to.
> >
> > So to get around the root priv requirement of AddMap I could have DRM
> > initially create a map which only allows master access to AGP space.
> > Then the non-root master could safely AddMap sub-maps which must exist
> > inside of the predefined AGP map. These sub-maps would lower the priv
> > requirements for parts of AGP space and allow the clients to run.
> >
> 
> The via drm module needs a kernel 2MB _RESTRICTED AGP map for the command
> stream. The master must not have access to that part, since it will allow
> a non-root master to modify the command stream once it has been
> security-checked.
> 
> How will drmAgpAlloc be handled? I mean, how will DRM know how big the
> initial map will be?

drmAgpAlloc() allocs drm_agp_mem structures which track the agp
allocs. I could change the map system to allow a single map to be
paired with each struct drm_agp_mem.

The 2MB restricted you are using was allocated with a call to
drmAgpAlloc(), right? You would then add a _RESTRICTED map which would
bind to the struct drm_agp_mem and stop further maps. We need to a
check to make sure a normal user can't free and reallocate a piece of
AGP memory marked restricted.

The drivers would then be changed to alloc the various parts of AGP
space instead of allocing one big chunk and carving it up. By allocing
multiple pieces the master can set different privs on each piece.

Backwards compatibility is maintained since root can make any maps
that it wants ignoring the one map per struct drm_agp_mem restriction.


-- 
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to