From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58865) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehIIj-0005GU-SK for qemu-devel@nongnu.org; Thu, 01 Feb 2018 12:05:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ehIIg-0002dv-NA for qemu-devel@nongnu.org; Thu, 01 Feb 2018 12:05:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49154) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ehIIf-0002cT-TJ for qemu-devel@nongnu.org; Thu, 01 Feb 2018 12:05:26 -0500 Date: Thu, 1 Feb 2018 19:05:03 +0200 From: "Michael S. Tsirkin" Message-ID: <20180201190326-mutt-send-email-mst@kernel.org> References: <20180131060229.9294-1-haozhong.zhang@intel.com> <20180201000240.zmwa6wwnthg2su36@hz-desktop> <20180201002457.hgyvph7z6iys5yvy@hz-desktop> <20180201022900.4znup2fovqr7bu5m@hz-desktop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v4 0/6] nvdimm: support MAP_SYNC for memory-backend-file List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Dan Williams Cc: Qemu Developers , Eduardo Habkost , Igor Mammedov , Paolo Bonzini , dgilbert@redhat.com, Xiao Guangrong , Stefan Hajnoczi , Alex Williamson On Wed, Jan 31, 2018 at 07:02:27PM -0800, Dan Williams wrote: > > Another question is how a user-space application (e.g., QEMU) knows > > whether it's safe to mmap a file on the DAX file system? > > I think we fix vaddr_get_pfn() to start failing for DAX mappings > unless/until we can add a "with lease" mechanism. Userspace will know > when it is safe again when vfio stops failing. I read some of the discussion around that but could not figure out what exactly does happen if a file is truncated by a malicious userspace. Could you let me know pls? Thanks! -- MST