Re: [PATCH v3 0/7] File Sealing & memfd_create()

2014-07-09 Thread Hugh Dickins
On Tue, 8 Jul 2014, David Herrmann wrote: > > Hugh, any comments on patch 5, 6 and 7? Those are the last outstanding > issues with memfd+sealing. Patch 7 (isolating pages) is still my > favorite and has been running just fine on my machine for the last > months. I think it'd be nice if we could

Re: [PATCH v3 0/7] File Sealing memfd_create()

2014-07-09 Thread Hugh Dickins
On Tue, 8 Jul 2014, David Herrmann wrote: Hugh, any comments on patch 5, 6 and 7? Those are the last outstanding issues with memfd+sealing. Patch 7 (isolating pages) is still my favorite and has been running just fine on my machine for the last months. I think it'd be nice if we could give

Re: [PATCH v3 0/7] File Sealing & memfd_create()

2014-07-08 Thread David Herrmann
Hi On Fri, Jun 13, 2014 at 12:36 PM, David Herrmann wrote: > Hi > > This is v3 of the File-Sealing and memfd_create() patches. You can find v1 > with > a longer introduction at gmane: > http://thread.gmane.org/gmane.comp.video.dri.devel/102241 > An LWN article about memfd+sealing is

Re: [PATCH v3 0/7] File Sealing memfd_create()

2014-07-08 Thread David Herrmann
Hi On Fri, Jun 13, 2014 at 12:36 PM, David Herrmann dh.herrm...@gmail.com wrote: Hi This is v3 of the File-Sealing and memfd_create() patches. You can find v1 with a longer introduction at gmane: http://thread.gmane.org/gmane.comp.video.dri.devel/102241 An LWN article about

Re: [PATCH v3 0/7] File Sealing & memfd_create()

2014-06-17 Thread Andy Lutomirski
On Tue, Jun 17, 2014 at 1:31 PM, Hugh Dickins wrote: > On Tue, 17 Jun 2014, Andy Lutomirski wrote: >> On Tue, Jun 17, 2014 at 9:51 AM, David Herrmann >> wrote: >> > On Tue, Jun 17, 2014 at 6:41 PM, Andy Lutomirski >> > wrote: >> >> On Tue, Jun 17, 2014 at 9:36 AM, David Herrmann >> >>

Re: [PATCH v3 0/7] File Sealing & memfd_create()

2014-06-17 Thread Hugh Dickins
On Tue, 17 Jun 2014, Andy Lutomirski wrote: > On Tue, Jun 17, 2014 at 9:51 AM, David Herrmann wrote: > > On Tue, Jun 17, 2014 at 6:41 PM, Andy Lutomirski > > wrote: > >> On Tue, Jun 17, 2014 at 9:36 AM, David Herrmann > >> wrote: > >>> On Tue, Jun 17, 2014 at 6:20 PM, Andy Lutomirski > >>>

Re: [PATCH v3 0/7] File Sealing & memfd_create()

2014-06-17 Thread Andy Lutomirski
On Tue, Jun 17, 2014 at 9:51 AM, David Herrmann wrote: > Hi > > On Tue, Jun 17, 2014 at 6:41 PM, Andy Lutomirski wrote: >> On Tue, Jun 17, 2014 at 9:36 AM, David Herrmann >> wrote: >>> Hi >>> >>> On Tue, Jun 17, 2014 at 6:20 PM, Andy Lutomirski >>> wrote: Can you summarize why holes

Re: [PATCH v3 0/7] File Sealing & memfd_create()

2014-06-17 Thread David Herrmann
Hi On Tue, Jun 17, 2014 at 6:41 PM, Andy Lutomirski wrote: > On Tue, Jun 17, 2014 at 9:36 AM, David Herrmann wrote: >> Hi >> >> On Tue, Jun 17, 2014 at 6:20 PM, Andy Lutomirski wrote: >>> Can you summarize why holes can't be reliably backed by the zero page? >> >> To answer this, I will quote

Re: [PATCH v3 0/7] File Sealing & memfd_create()

2014-06-17 Thread Andy Lutomirski
On Tue, Jun 17, 2014 at 9:36 AM, David Herrmann wrote: > Hi > > On Tue, Jun 17, 2014 at 6:20 PM, Andy Lutomirski wrote: >> Can you summarize why holes can't be reliably backed by the zero page? > > To answer this, I will quote Hugh from "PATCH v2 1/3": > >> We do already use the ZERO_PAGE

Re: [PATCH v3 0/7] File Sealing & memfd_create()

2014-06-17 Thread David Herrmann
Hi On Tue, Jun 17, 2014 at 6:20 PM, Andy Lutomirski wrote: > Can you summarize why holes can't be reliably backed by the zero page? To answer this, I will quote Hugh from "PATCH v2 1/3": > We do already use the ZERO_PAGE instead of allocating when it's a > simple read; and on the face of it,

Re: [PATCH v3 0/7] File Sealing & memfd_create()

2014-06-17 Thread David Herrmann
Hi On Tue, Jun 17, 2014 at 2:13 PM, Florian Weimer wrote: > On 06/17/2014 12:10 PM, David Herrmann wrote: > The file might have holes, therefore, you'd have to allocate backing pages. This might hit a soft-limit and fail. To avoid this, use fallocate() to allocate pages prior to

Re: [PATCH v3 0/7] File Sealing & memfd_create()

2014-06-17 Thread Florian Weimer
On 06/17/2014 12:10 PM, David Herrmann wrote: The file might have holes, therefore, you'd have to allocate backing pages. This might hit a soft-limit and fail. To avoid this, use fallocate() to allocate pages prior to mmap() This does not work because the consuming side does not know how the

Re: [PATCH v3 0/7] File Sealing & memfd_create()

2014-06-17 Thread David Herrmann
Hi On Tue, Jun 17, 2014 at 12:04 PM, Florian Weimer wrote: > On 06/17/2014 12:01 PM, David Herrmann wrote: > >>> I don't think this is what potential users expect because mlock requires >>> capabilities which are not available to them. >>> >>> A couple of weeks ago, sealing was to be applied to

Re: [PATCH v3 0/7] File Sealing & memfd_create()

2014-06-17 Thread Florian Weimer
On 06/17/2014 12:01 PM, David Herrmann wrote: I don't think this is what potential users expect because mlock requires capabilities which are not available to them. A couple of weeks ago, sealing was to be applied to anonymous shared memory. Has this changed? Why should *reading* it trigger

Re: [PATCH v3 0/7] File Sealing & memfd_create()

2014-06-17 Thread David Herrmann
Hi On Tue, Jun 17, 2014 at 11:54 AM, Florian Weimer wrote: > On 06/13/2014 05:33 PM, David Herrmann wrote: >> >> On Fri, Jun 13, 2014 at 5:17 PM, Andy Lutomirski >> wrote: >>> >>> Isn't the point of SEAL_SHRINK to allow servers to mmap and read >>> safely without worrying about SIGBUS? >> >> >>

Re: [PATCH v3 0/7] File Sealing & memfd_create()

2014-06-17 Thread Florian Weimer
On 06/13/2014 05:33 PM, David Herrmann wrote: On Fri, Jun 13, 2014 at 5:17 PM, Andy Lutomirski wrote: Isn't the point of SEAL_SHRINK to allow servers to mmap and read safely without worrying about SIGBUS? No, I don't think so. The point of SEAL_SHRINK is to prevent a file from shrinking.

Re: [PATCH v3 0/7] File Sealing memfd_create()

2014-06-17 Thread Florian Weimer
On 06/13/2014 05:33 PM, David Herrmann wrote: On Fri, Jun 13, 2014 at 5:17 PM, Andy Lutomirski l...@amacapital.net wrote: Isn't the point of SEAL_SHRINK to allow servers to mmap and read safely without worrying about SIGBUS? No, I don't think so. The point of SEAL_SHRINK is to prevent a file

Re: [PATCH v3 0/7] File Sealing memfd_create()

2014-06-17 Thread David Herrmann
Hi On Tue, Jun 17, 2014 at 11:54 AM, Florian Weimer fwei...@redhat.com wrote: On 06/13/2014 05:33 PM, David Herrmann wrote: On Fri, Jun 13, 2014 at 5:17 PM, Andy Lutomirski l...@amacapital.net wrote: Isn't the point of SEAL_SHRINK to allow servers to mmap and read safely without worrying

Re: [PATCH v3 0/7] File Sealing memfd_create()

2014-06-17 Thread Florian Weimer
On 06/17/2014 12:01 PM, David Herrmann wrote: I don't think this is what potential users expect because mlock requires capabilities which are not available to them. A couple of weeks ago, sealing was to be applied to anonymous shared memory. Has this changed? Why should *reading* it trigger

Re: [PATCH v3 0/7] File Sealing memfd_create()

2014-06-17 Thread David Herrmann
Hi On Tue, Jun 17, 2014 at 12:04 PM, Florian Weimer fwei...@redhat.com wrote: On 06/17/2014 12:01 PM, David Herrmann wrote: I don't think this is what potential users expect because mlock requires capabilities which are not available to them. A couple of weeks ago, sealing was to be applied

Re: [PATCH v3 0/7] File Sealing memfd_create()

2014-06-17 Thread Florian Weimer
On 06/17/2014 12:10 PM, David Herrmann wrote: The file might have holes, therefore, you'd have to allocate backing pages. This might hit a soft-limit and fail. To avoid this, use fallocate() to allocate pages prior to mmap() This does not work because the consuming side does not know how the

Re: [PATCH v3 0/7] File Sealing memfd_create()

2014-06-17 Thread David Herrmann
Hi On Tue, Jun 17, 2014 at 2:13 PM, Florian Weimer fwei...@redhat.com wrote: On 06/17/2014 12:10 PM, David Herrmann wrote: The file might have holes, therefore, you'd have to allocate backing pages. This might hit a soft-limit and fail. To avoid this, use fallocate() to allocate pages prior

Re: [PATCH v3 0/7] File Sealing memfd_create()

2014-06-17 Thread David Herrmann
Hi On Tue, Jun 17, 2014 at 6:20 PM, Andy Lutomirski l...@amacapital.net wrote: Can you summarize why holes can't be reliably backed by the zero page? To answer this, I will quote Hugh from PATCH v2 1/3: We do already use the ZERO_PAGE instead of allocating when it's a simple read; and on the

Re: [PATCH v3 0/7] File Sealing memfd_create()

2014-06-17 Thread Andy Lutomirski
On Tue, Jun 17, 2014 at 9:36 AM, David Herrmann dh.herrm...@gmail.com wrote: Hi On Tue, Jun 17, 2014 at 6:20 PM, Andy Lutomirski l...@amacapital.net wrote: Can you summarize why holes can't be reliably backed by the zero page? To answer this, I will quote Hugh from PATCH v2 1/3: We do

Re: [PATCH v3 0/7] File Sealing memfd_create()

2014-06-17 Thread David Herrmann
Hi On Tue, Jun 17, 2014 at 6:41 PM, Andy Lutomirski l...@amacapital.net wrote: On Tue, Jun 17, 2014 at 9:36 AM, David Herrmann dh.herrm...@gmail.com wrote: Hi On Tue, Jun 17, 2014 at 6:20 PM, Andy Lutomirski l...@amacapital.net wrote: Can you summarize why holes can't be reliably backed by

Re: [PATCH v3 0/7] File Sealing memfd_create()

2014-06-17 Thread Andy Lutomirski
On Tue, Jun 17, 2014 at 9:51 AM, David Herrmann dh.herrm...@gmail.com wrote: Hi On Tue, Jun 17, 2014 at 6:41 PM, Andy Lutomirski l...@amacapital.net wrote: On Tue, Jun 17, 2014 at 9:36 AM, David Herrmann dh.herrm...@gmail.com wrote: Hi On Tue, Jun 17, 2014 at 6:20 PM, Andy Lutomirski

Re: [PATCH v3 0/7] File Sealing memfd_create()

2014-06-17 Thread Hugh Dickins
On Tue, 17 Jun 2014, Andy Lutomirski wrote: On Tue, Jun 17, 2014 at 9:51 AM, David Herrmann dh.herrm...@gmail.com wrote: On Tue, Jun 17, 2014 at 6:41 PM, Andy Lutomirski l...@amacapital.net wrote: On Tue, Jun 17, 2014 at 9:36 AM, David Herrmann dh.herrm...@gmail.com wrote: On Tue, Jun

Re: [PATCH v3 0/7] File Sealing memfd_create()

2014-06-17 Thread Andy Lutomirski
On Tue, Jun 17, 2014 at 1:31 PM, Hugh Dickins hu...@google.com wrote: On Tue, 17 Jun 2014, Andy Lutomirski wrote: On Tue, Jun 17, 2014 at 9:51 AM, David Herrmann dh.herrm...@gmail.com wrote: On Tue, Jun 17, 2014 at 6:41 PM, Andy Lutomirski l...@amacapital.net wrote: On Tue, Jun 17, 2014

Re: [PATCH v3 0/7] File Sealing & memfd_create()

2014-06-13 Thread David Herrmann
Hi On Fri, Jun 13, 2014 at 5:17 PM, Andy Lutomirski wrote: > On Fri, Jun 13, 2014 at 8:15 AM, David Herrmann wrote: >> Hi >> >> On Fri, Jun 13, 2014 at 5:10 PM, Andy Lutomirski wrote: >>> On Fri, Jun 13, 2014 at 3:36 AM, David Herrmann >>> wrote: Hi This is v3 of the

Re: [PATCH v3 0/7] File Sealing & memfd_create()

2014-06-13 Thread Andy Lutomirski
On Fri, Jun 13, 2014 at 8:15 AM, David Herrmann wrote: > Hi > > On Fri, Jun 13, 2014 at 5:10 PM, Andy Lutomirski wrote: >> On Fri, Jun 13, 2014 at 3:36 AM, David Herrmann >> wrote: >>> Hi >>> >>> This is v3 of the File-Sealing and memfd_create() patches. You can find v1 >>> with >>> a longer

Re: [PATCH v3 0/7] File Sealing & memfd_create()

2014-06-13 Thread David Herrmann
Hi On Fri, Jun 13, 2014 at 5:10 PM, Andy Lutomirski wrote: > On Fri, Jun 13, 2014 at 3:36 AM, David Herrmann wrote: >> Hi >> >> This is v3 of the File-Sealing and memfd_create() patches. You can find v1 >> with >> a longer introduction at gmane: >>

Re: [PATCH v3 0/7] File Sealing & memfd_create()

2014-06-13 Thread Andy Lutomirski
On Fri, Jun 13, 2014 at 3:36 AM, David Herrmann wrote: > Hi > > This is v3 of the File-Sealing and memfd_create() patches. You can find v1 > with > a longer introduction at gmane: > http://thread.gmane.org/gmane.comp.video.dri.devel/102241 > An LWN article about memfd+sealing is available,

[PATCH v3 0/7] File Sealing & memfd_create()

2014-06-13 Thread David Herrmann
Hi This is v3 of the File-Sealing and memfd_create() patches. You can find v1 with a longer introduction at gmane: http://thread.gmane.org/gmane.comp.video.dri.devel/102241 An LWN article about memfd+sealing is available, too: https://lwn.net/Articles/593918/ v2 with some more discussions can

[PATCH v3 0/7] File Sealing memfd_create()

2014-06-13 Thread David Herrmann
Hi This is v3 of the File-Sealing and memfd_create() patches. You can find v1 with a longer introduction at gmane: http://thread.gmane.org/gmane.comp.video.dri.devel/102241 An LWN article about memfd+sealing is available, too: https://lwn.net/Articles/593918/ v2 with some more discussions can

Re: [PATCH v3 0/7] File Sealing memfd_create()

2014-06-13 Thread Andy Lutomirski
On Fri, Jun 13, 2014 at 3:36 AM, David Herrmann dh.herrm...@gmail.com wrote: Hi This is v3 of the File-Sealing and memfd_create() patches. You can find v1 with a longer introduction at gmane: http://thread.gmane.org/gmane.comp.video.dri.devel/102241 An LWN article about memfd+sealing is

Re: [PATCH v3 0/7] File Sealing memfd_create()

2014-06-13 Thread David Herrmann
Hi On Fri, Jun 13, 2014 at 5:10 PM, Andy Lutomirski l...@amacapital.net wrote: On Fri, Jun 13, 2014 at 3:36 AM, David Herrmann dh.herrm...@gmail.com wrote: Hi This is v3 of the File-Sealing and memfd_create() patches. You can find v1 with a longer introduction at gmane:

Re: [PATCH v3 0/7] File Sealing memfd_create()

2014-06-13 Thread Andy Lutomirski
On Fri, Jun 13, 2014 at 8:15 AM, David Herrmann dh.herrm...@gmail.com wrote: Hi On Fri, Jun 13, 2014 at 5:10 PM, Andy Lutomirski l...@amacapital.net wrote: On Fri, Jun 13, 2014 at 3:36 AM, David Herrmann dh.herrm...@gmail.com wrote: Hi This is v3 of the File-Sealing and memfd_create()

Re: [PATCH v3 0/7] File Sealing memfd_create()

2014-06-13 Thread David Herrmann
Hi On Fri, Jun 13, 2014 at 5:17 PM, Andy Lutomirski l...@amacapital.net wrote: On Fri, Jun 13, 2014 at 8:15 AM, David Herrmann dh.herrm...@gmail.com wrote: Hi On Fri, Jun 13, 2014 at 5:10 PM, Andy Lutomirski l...@amacapital.net wrote: On Fri, Jun 13, 2014 at 3:36 AM, David Herrmann