Thread (9 messages) 9 messages, 4 authors, 2014-06-17

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

From: David Herrmann <hidden>
Date: 2014-06-17 16:36:55
Also in: linux-fsdevel, linux-mm, lkml

Hi

On Tue, Jun 17, 2014 at 6:20 PM, Andy Lutomirski [off-list ref] 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, we could extend that to mmap
once the file is sealed.  But I am rather afraid to do so - for
many years there was an mmap /dev/zero case which did that, but
it was an easily forgotten case which caught us out at least
once, so I'm reluctant to reintroduce it now for sealing.

Anyway, I don't expect you to resolve the issue of sealed holes:
that's very much my territory, to give you support on.
Holes can be avoided with a simple fallocate(). I don't understand why
I should make SEAL_WRITE do the fallocate for the caller. During the
discussion of memfd_create() I was told to drop the "size" parameter,
because it is redundant. I don't see how this implicit fallocate()
does not fall into the same category?

Thanks
David

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help