why not allow another process access to share memory of xvfb?

Daniel Stone daniel at fooishbar.org
Thu Jun 10 04:09:31 PDT 2010


On Thu, Jun 10, 2010 at 03:10:52PM +0800, xin zhang wrote:
> Hi experts:
>     In Xvfb implementation, the frame buffer is allocated with IPC_PRIVATE
> if uses SHM.
>     Given that IPC_PRIVATE is just useful to parent/child process, and given
> X is a single process,
>     I don't realize what is the use.
>     Why not add a param which allows user pass a string to produce IPC key,
> and create share memory
>     with the key, then other process will really access to the frame buffer.
>     I think this will benefit many softwares, e.g. VNC, there is no need to
> write an individual X server, just
>     do an extension hooks on Xvfb is OK.
> 
>     Does anyone know the reason? is it for security? thank you.

Because direct access to the framebuffer might get you anything,
including corruption if you access it in the middle of a copy.  If you
want to get the framebuffer contents through SHM, use XShmGetImage().

Cheers,
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100610/0ea7b720/attachment.pgp>


More information about the xorg-devel mailing list