Re: AGP & non-root mmap calls: "lending" priviledges to a client

Andi Kleen (ak@muc.de)
19 Jul 1999 16:21:48 +0200


roell@xig.com (Thomas Roell) writes:

> In your message of 18 July 1999 you write:
>
> > > A question that has been presented to us is that of direct mmap() access to
> > > AGP bridge-viewed RAM. For our AGP/GART device, the client non-root
> > > processes that are coordinated by the X server are handed a "magic cookie"
> > > that can be used to "bless" a device file descriptor (allowed inside the
> > > kernel) ... and thus allow any mmap as needed directly from the AGP/GART
> > > device. In general, then, only smart and X-server coordinated processes are
> > > then able to do this, enhancing stability, but decreasing unneeded
> > > centralization.
> > >
> > > Are there any plans to allow "handing over" priviledges to clients, from one
> > > process to another? Should a technique of "trusted-cookies" be used to
> >
> > It already exists for general handle passing for file handles.
>
> Can you give me a pointer to that meachansim, and also how it's
> handled in other Unix like operating systems ?

[for the Linux part]
Get a copy of man-pages-1.24 and read unix(7)

SCM_CREDENTIALS is in newer BSD, but not in most other Unixes afaik.
SCM_RIGHTS is available on most Unixes in slight variations.
A good collection of fd passing functions ported to lots of systems
is in the old NCSA httpd source.

-Andi

-- 
This is like TV. I don't like TV.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/