From: Tormod Volden <lists.tormod@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: Dave Airlie <airlied@redhat.com>
Subject: Re: [PATCH v2] drm: Compare only lower 32 bits of framebuffer map offsets
Date: Wed, 1 Jun 2011 00:04:40 +0200 [thread overview]
Message-ID: <BANLkTikF06Y=08r8etcDN-tSh1yznoHQuQ@mail.gmail.com> (raw)
In-Reply-To: <1306784743-2430-1-git-send-email-lists.tormod@gmail.com>
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
next prev parent reply other threads:[~2011-05-31 22:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-25 21:54 multiple framebuffer drm maps Tormod Volden
2011-05-03 21:20 ` Tormod Volden
2011-05-03 21:54 ` Tormod Volden
2011-05-22 19:27 ` [PATCH] drm/savage: Do not add framebuffer and aperture maps Tormod Volden
2011-05-27 18:19 ` [PATCH resend] " Tormod Volden
2011-05-27 20:48 ` Dave Airlie
2011-05-27 23:44 ` Tormod Volden
2011-05-29 23:12 ` [PATCH] drm: Compare only lower 32 bits of framebuffer map offsets Tormod Volden
2011-05-29 23:29 ` Dave Airlie
2011-05-30 19:45 ` [PATCH v2] " Tormod Volden
2011-05-31 22:04 ` Tormod Volden [this message]
2011-06-10 22:59 ` Tormod Volden
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='BANLkTikF06Y=08r8etcDN-tSh1yznoHQuQ@mail.gmail.com' \
--to=lists.tormod@gmail.com \
--cc=airlied@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).