From: Daniel Vetter <daniel@ffwll.ch>
To: "Christian König" <christian.koenig@amd.com>
Cc: "Jason Gunthorpe" <jgg@ziepe.ca>,
"Daniel Vetter" <daniel.vetter@ffwll.ch>,
"Thomas Hellström (Intel)" <thomas_os@shipmail.org>,
"DRI Development" <dri-devel@lists.freedesktop.org>,
"Intel Graphics Development" <intel-gfx@lists.freedesktop.org>,
"Matthew Wilcox" <willy@infradead.org>,
"moderated list:DMA BUFFER SHARING FRAMEWORK"
<linaro-mm-sig@lists.linaro.org>,
"John Stultz" <john.stultz@linaro.org>,
"Daniel Vetter" <daniel.vetter@intel.com>,
"Suren Baghdasaryan" <surenb@google.com>,
"open list:DMA BUFFER SHARING FRAMEWORK"
<linux-media@vger.kernel.org>
Subject: Re: [Linaro-mm-sig] [PATCH 1/2] dma-buf: Require VM_PFNMAP vma for mmap
Date: Thu, 25 Feb 2021 11:45:43 +0100 [thread overview]
Message-ID: <YDd/1xvDoctHWgdD@phenom.ffwll.local> (raw)
In-Reply-To: <b364d7e9-b323-e590-359d-32e067f3f5ee@amd.com>
On Thu, Feb 25, 2021 at 11:30:23AM +0100, Christian König wrote:
>
>
> Am 24.02.21 um 19:46 schrieb Jason Gunthorpe:
> > On Wed, Feb 24, 2021 at 09:45:51AM +0100, Daniel Vetter wrote:
> >
> > > Hm I figured everyone just uses MAP_SHARED for buffer objects since
> > > COW really makes absolutely no sense. How would we enforce this?
> > In RDMA we test
> >
> > drivers/infiniband/core/ib_core_uverbs.c: if (!(vma->vm_flags & VM_SHARED))
> >
> > During mmap to reject use of MAP_PRIVATE on BAR pages.
>
> That's a really good idea. MAP_PRIVATE and any driver mappings doesn't
> really work at all.
Yeah I feel like this is the next patch we need to add on this little
series of locking down dma-buf mmap semantics. Probably should also push
these into drm gem mmap code (and maybe ttm can switch over to that, it's
really the same).
One at a time.
-Daniel
>
> Christian.
>
> >
> > Jason
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
next prev parent reply other threads:[~2021-02-25 10:49 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-23 10:59 [PATCH 1/2] dma-buf: Require VM_PFNMAP vma for mmap Daniel Vetter
2021-02-24 7:46 ` [Linaro-mm-sig] " Thomas Hellström (Intel)
2021-02-24 8:45 ` Daniel Vetter
2021-02-24 9:15 ` Thomas Hellström (Intel)
2021-02-24 9:31 ` Daniel Vetter
2021-02-25 10:28 ` Christian König
2021-02-25 10:44 ` Daniel Vetter
2021-02-25 15:49 ` Daniel Vetter
2021-02-25 16:53 ` Christian König
2021-02-26 9:41 ` Thomas Hellström (Intel)
2021-02-26 13:28 ` Daniel Vetter
2021-02-27 8:06 ` Thomas Hellström (Intel)
2021-03-01 8:28 ` Daniel Vetter
2021-03-01 8:39 ` Thomas Hellström (Intel)
2021-03-01 9:05 ` Daniel Vetter
2021-03-01 9:21 ` Thomas Hellström (Intel)
2021-03-01 10:17 ` Christian König
2021-03-01 14:09 ` Daniel Vetter
2021-03-11 10:22 ` Thomas Hellström (Intel)
2021-03-11 13:00 ` Daniel Vetter
2021-03-11 13:12 ` Thomas Hellström (Intel)
2021-03-11 13:17 ` Daniel Vetter
2021-03-11 15:37 ` Thomas Hellström (Intel)
2021-03-12 7:51 ` Christian König
2021-02-24 18:46 ` Jason Gunthorpe
2021-02-25 10:30 ` Christian König
2021-02-25 10:45 ` Daniel Vetter [this message]
2021-02-26 3:57 ` John Stultz
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=YDd/1xvDoctHWgdD@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=christian.koenig@amd.com \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jgg@ziepe.ca \
--cc=john.stultz@linaro.org \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-media@vger.kernel.org \
--cc=surenb@google.com \
--cc=thomas_os@shipmail.org \
--cc=willy@infradead.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