dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Inki Dae <inki.dae@samsung.com>
To: 'Jerome Glisse' <j.glisse@gmail.com>, 'Dave Airlie' <airlied@gmail.com>
Cc: kyungmin.park@samsung.com, sw0312.kim@samsung.com,
	dri-devel@lists.freedesktop.org
Subject: RE: [PATCH v2 3/4] drm/exynos: added userptr feature.
Date: Tue, 08 May 2012 16:59:00 +0900	[thread overview]
Message-ID: <022e01cd2cf0$6dbcb7f0$493627d0$%dae@samsung.com> (raw)
In-Reply-To: <CAH3drwYjE8e7YWsNuwLQ03MJHwfbtYXKMODwEq7zi68Ljb_8Cw@mail.gmail.com>

Hi Jerome,

> -----Original Message-----
> From: Jerome Glisse [mailto:j.glisse@gmail.com]
> Sent: Tuesday, May 08, 2012 3:18 AM
> To: Dave Airlie
> Cc: daeinki@gmail.com; Inki Dae; kyungmin.park@samsung.com;
> sw0312.kim@samsung.com; dri-devel@lists.freedesktop.org
> Subject: Re: [PATCH v2 3/4] drm/exynos: added userptr feature.
> 
> On Sat, May 5, 2012 at 6:22 AM, Dave Airlie <airlied@gmail.com> wrote:
> > On Sat, May 5, 2012 at 11:19 AM,  <daeinki@gmail.com> wrote:
> >> Hi Dave,
> >>
> >> 2012. 4. 25. 오후 7:15 Dave Airlie <airlied@gmail.com> 작성:
> >>
> >>> On Tue, Apr 24, 2012 at 6:17 AM, Inki Dae <inki.dae@samsung.com>
wrote:
> >>>> this feature could be used to use memory region allocated by malloc()
> in user
> >>>> mode and mmaped memory region allocated by other memory allocators.
> userptr
> >>>> interface can identify memory type through vm_flags value and would
> get
> >>>> pages or page frame numbers to user space appropriately.
> >>>
> >>> Is there anything to stop the unpriviledged userspace driver locking
> >>> all the RAM in the machine inside userptr?
> >>>
> >>
> >> you mean that there is something that it can stop user space driver
> locking some memory region  of RAM? and if any user space driver locked
> some region then anyone on user space can't access the region? could you
> please tell me about your concerns in more detail so that we can solve the
> issue? I guess you mean that any user level driver such as specific EGL
> library can allocate some memory region and also lock the region so that
> other user space applications can't access the region until rendering is
> completed by hw accelerator such as 2d/3d core or opposite case.
> >>
> >> actually, this feature has already been used by v4l2 so I didn't try to
> consider we could face with any problem with this and I've got a feeling
> maybe there is something I missed so I'd be happy for you or anyone give
> me any advices.
> >
> > Well v4l get to make their own bad design decisions.
> >
> > The problem is if an unprivledged users accessing the drm can lock all
> > the pages it allocates into memory, by passing them to the kernel as
> > userptrs., thus bypassing the swap and blocking all other users on the
> > system.
> >
> > Dave.
> 
> Beside that you are not locking the vma and afaik this means that the
> page backing the vma might change, yes you will still own the page you
> get but userspace might be reading/writing to different pages. The vma

Yes, right. the vma should be locked because the pages backing the vma
might be changed after swap-in. thank you for your pointing.


> would need to be locked but than the userspace might unlock it in your
> back and you start right from the begining.
> 

I'm not sure I understood your comments but my understanding is you mean
that there is some interface that it can unlock(using some interface of drm
side or implementing it?) the vma so we can resolve the issue Dave pointed
out?

Thanks,
Inki Dae

> Cheers,
> Jerome

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

  reply	other threads:[~2012-05-08  7:59 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-23 13:43 [PATCH 0/4] updated exynos-drm-next Inki Dae
2012-04-23 13:43 ` [PATCH 1/4] drm/exynos: added cache attribute support for gem Inki Dae
2012-04-23 13:43 ` [PATCH 2/4] drm/exynos: added drm prime feature Inki Dae
2012-04-23 13:43 ` [PATCH 3/4] drm/exynos: added userptr feature Inki Dae
2012-04-24  5:17   ` [PATCH v2 " Inki Dae
2012-04-25 10:15     ` Dave Airlie
2012-04-25 12:46       ` InKi Dae
2012-05-05 10:19       ` daeinki
2012-05-05 10:22         ` Dave Airlie
2012-05-07 18:18           ` Jerome Glisse
2012-05-08  7:59             ` Inki Dae [this message]
2012-05-08 15:05               ` Jerome Glisse
2012-05-08  6:48           ` Inki Dae
2012-05-09  6:17   ` [PATCH 0/2 v3] " Inki Dae
2012-05-09  6:17     ` [PATCH 1/2 v3] drm/exynos: added userptr limit ioctl Inki Dae
2012-05-09  6:17     ` [PATCH 2/2 v3] drm/exynos: added userptr feature Inki Dae
2012-05-09 14:45       ` Jerome Glisse
2012-05-09 18:32         ` Jerome Glisse
2012-05-10  2:44           ` Inki Dae
2012-05-10 15:05             ` Jerome Glisse
2012-05-10 15:31               ` Daniel Vetter
2012-05-10 15:52                 ` Jerome Glisse
2012-05-11  1:47                   ` Inki Dae
2012-05-11  2:08                     ` Minchan Kim
2012-05-10  1:39         ` Inki Dae
2012-05-10  4:58           ` Minchan Kim
2012-05-10  6:53             ` KOSAKI Motohiro
2012-05-10  7:27               ` Minchan Kim
2012-05-10  7:31                 ` Kyungmin Park
2012-05-10  7:56                   ` Minchan Kim
2012-05-10  7:58                     ` Minchan Kim
2012-05-10  6:57             ` Inki Dae
2012-05-10  7:05               ` Minchan Kim
2012-05-10  7:59                 ` InKi Dae
2012-05-10  8:11                   ` Minchan Kim
2012-05-10  8:44                     ` Inki Dae
2012-05-10 17:53                       ` KOSAKI Motohiro
2012-05-11  0:50                         ` Minchan Kim
2012-05-11  2:51                           ` KOSAKI Motohiro
2012-05-11  3:01                             ` Jerome Glisse
2012-05-11 21:20                               ` KOSAKI Motohiro
2012-05-11 22:22                                 ` Jerome Glisse
2012-05-11 22:59                                   ` KOSAKI Motohiro
2012-05-11 23:29                                     ` Jerome Glisse
2012-05-11 23:39                                       ` KOSAKI Motohiro
2012-05-12  4:48                                         ` InKi Dae
2012-05-14  4:29                                           ` Minchan Kim
2012-05-14  6:17     ` [PATCH 0/2 v4] " Inki Dae
2012-05-14  6:17       ` [PATCH 1/2 v4] drm/exynos: added userptr limit ioctl Inki Dae
2012-05-14  8:12         ` Inki Dae
2012-05-14  6:17       ` [PATCH 2/2 v4] drm/exynos: added userptr feature Inki Dae
2012-05-14  6:33         ` KOSAKI Motohiro
2012-05-14  6:52           ` Inki Dae
2012-05-14  7:04             ` KOSAKI Motohiro
2012-05-14  7:21               ` Inki Dae
2012-05-14  8:13               ` Inki Dae
2012-05-14 19:26         ` Jerome Glisse
2012-05-15  4:33           ` Inki Dae
2012-05-15 14:31             ` Jerome Glisse
2012-05-16  8:49               ` Inki Dae
2012-05-14  8:12       ` [PATCH 0/2 " Inki Dae
2012-05-15  7:34   ` [PATCH 3/4] " Rob Clark
2012-05-15  8:17     ` Inki Dae
2012-05-15  9:35       ` Rob Clark
2012-05-15 13:40         ` InKi Dae
2012-05-15 14:28           ` Rob Clark
2012-05-16  6:04             ` Inki Dae
2012-05-16  8:42               ` Rob Clark
2012-05-16 10:30                 ` Inki Dae
2012-05-16  9:22     ` Dave Airlie
2012-05-16 10:20       ` Inki Dae
2012-05-16 12:12         ` Rob Clark
2012-05-16 13:27           ` Inki Dae
2012-04-23 13:43 ` [PATCH 4/4] drm/exynos: added a feature to get gem buffer information Inki Dae

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='022e01cd2cf0$6dbcb7f0$493627d0$%dae@samsung.com' \
    --to=inki.dae@samsung.com \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=j.glisse@gmail.com \
    --cc=kyungmin.park@samsung.com \
    --cc=sw0312.kim@samsung.com \
    /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