From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ig0-f178.google.com (mail-ig0-f178.google.com [209.85.213.178]) by kanga.kvack.org (Postfix) with ESMTP id 9ECA66B0038 for ; Tue, 17 Jun 2014 12:36:56 -0400 (EDT) Received: by mail-ig0-f178.google.com with SMTP id hn18so4399629igb.17 for ; Tue, 17 Jun 2014 09:36:56 -0700 (PDT) Received: from mail-ig0-x236.google.com (mail-ig0-x236.google.com [2607:f8b0:4001:c05::236]) by mx.google.com with ESMTPS id hg12si4188810icb.17.2014.06.17.09.36.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Jun 2014 09:36:55 -0700 (PDT) Received: by mail-ig0-f182.google.com with SMTP id a13so4401626igq.3 for ; Tue, 17 Jun 2014 09:36:55 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1402655819-14325-1-git-send-email-dh.herrmann@gmail.com> <53A01049.6020502@redhat.com> Date: Tue, 17 Jun 2014 18:36:55 +0200 Message-ID: Subject: Re: [PATCH v3 0/7] File Sealing & memfd_create() From: David Herrmann Content-Type: text/plain; charset=UTF-8 Sender: owner-linux-mm@kvack.org List-ID: To: Andy Lutomirski Cc: "linux-mm@kvack.org" , Greg KH , Florian Weimer , Hugh Dickins , "linux-kernel@vger.kernel.org" , Lennart Poettering , Andrew Morton , Linux API , Michael Kerrisk , Kay Sievers , John Stultz , Linus Torvalds , Daniel Mack , Ryan Lortie , Linux FS Devel , Tony Battersby 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, 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: email@kvack.org