Re: [PATCH v2] drm: Compare only lower 32 bits of framebuffer map offsets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 30, 2011 at 9:45 PM, Tormod Volden wrote:
> (*) It actually checks if _DRM_CONTAINS_LOCK is the /only/ flag set. I
> suppose this is intentional. My v2 patch does not change anything in the
> case of _DRM_SHM: If it contains a lock, it returns a match without
> comparing offsets. If no lock, it compares the full offsets. Is this
> because the only _DRM_SHM used by userspace is the one with a lock, so
> there is never a need to check a userspace-provided offset, or are those
> always within 32 bit so a full check is ok?

After googling up an old "DRM map design" thread from 2005
(http://thread.gmane.org/gmane.comp.video.dri.devel/19545/focus=19689),
and http://dri.freedesktop.org/wiki/DrmMapHandling I think I can
answer this to some extent myself: For _DRM_SHM it is not an offset
that is passed from/to userspace, but a handle, which I guess is kept
within 32 bit. Although this is not fully clear to me after browsing
through drm_addmap_core(), where the offset or handle is the result of
vmalloc_user().

Tormod
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux