From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 96593219493F2 for ; Wed, 26 Apr 2017 11:00:22 -0700 (PDT) Date: Wed, 26 Apr 2017 12:00:21 -0600 From: Ross Zwisler Subject: Re: [PATCH v2 2/2] dax: add regression test for stale mmap reads Message-ID: <20170426180021.GB15921@linux.intel.com> References: <20170425205106.20576-1-ross.zwisler@linux.intel.com> <20170425205106.20576-2-ross.zwisler@linux.intel.com> <20170426090907.q5jj3ywsvldsbq7n@XZHOUW.usersys.redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170426090907.q5jj3ywsvldsbq7n@XZHOUW.usersys.redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" To: Xiong Zhou Cc: Jan Kara , eguan@redhat.com, "Darrick J. Wong" , linux-nvdimm@lists.01.org, Andrew Morton , fstests@vger.kernel.org, Christoph Hellwig , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org List-ID: On Wed, Apr 26, 2017 at 05:09:07PM +0800, Xiong Zhou wrote: > On Tue, Apr 25, 2017 at 02:51:06PM -0600, Ross Zwisler wrote: <> > > + /* > > + * Try and use the mmap to read back the data we just wrote with > > + * pwrite(). If the kernel bug is present the mapping from the 2MiB > > + * zero page will still be intact, and we'll read back zeros instead. > > + */ > > + if (strncmp(buffer, data, strlen(buffer))) { > > + fprintf(stderr, "strncmp mismatch: '%s' vs '%s'\n", buffer, > > + data); > munmap > close(fd); > > + exit(1); > > + } > > + > munmap Yep, thanks, fixed in v3. _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com ([134.134.136.24]:26539 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932610AbdDZSAX (ORCPT ); Wed, 26 Apr 2017 14:00:23 -0400 Date: Wed, 26 Apr 2017 12:00:21 -0600 From: Ross Zwisler Subject: Re: [PATCH v2 2/2] dax: add regression test for stale mmap reads Message-ID: <20170426180021.GB15921@linux.intel.com> References: <20170425205106.20576-1-ross.zwisler@linux.intel.com> <20170425205106.20576-2-ross.zwisler@linux.intel.com> <20170426090907.q5jj3ywsvldsbq7n@XZHOUW.usersys.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170426090907.q5jj3ywsvldsbq7n@XZHOUW.usersys.redhat.com> Sender: fstests-owner@vger.kernel.org To: Xiong Zhou Cc: Ross Zwisler , fstests@vger.kernel.org, jmoyer@redhat.com, eguan@redhat.com, Christoph Hellwig , Dan Williams , "Darrick J. Wong" , Jan Kara , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-nvdimm@ml01.01.org, Andrew Morton List-ID: On Wed, Apr 26, 2017 at 05:09:07PM +0800, Xiong Zhou wrote: > On Tue, Apr 25, 2017 at 02:51:06PM -0600, Ross Zwisler wrote: <> > > + /* > > + * Try and use the mmap to read back the data we just wrote with > > + * pwrite(). If the kernel bug is present the mapping from the 2MiB > > + * zero page will still be intact, and we'll read back zeros instead. > > + */ > > + if (strncmp(buffer, data, strlen(buffer))) { > > + fprintf(stderr, "strncmp mismatch: '%s' vs '%s'\n", buffer, > > + data); > munmap > close(fd); > > + exit(1); > > + } > > + > munmap Yep, thanks, fixed in v3. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 26 Apr 2017 12:00:21 -0600 From: Ross Zwisler To: Xiong Zhou Cc: Ross Zwisler , fstests@vger.kernel.org, jmoyer@redhat.com, eguan@redhat.com, Christoph Hellwig , Dan Williams , "Darrick J. Wong" , Jan Kara , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-nvdimm@lists.01.org, Andrew Morton Subject: Re: [PATCH v2 2/2] dax: add regression test for stale mmap reads Message-ID: <20170426180021.GB15921@linux.intel.com> References: <20170425205106.20576-1-ross.zwisler@linux.intel.com> <20170425205106.20576-2-ross.zwisler@linux.intel.com> <20170426090907.q5jj3ywsvldsbq7n@XZHOUW.usersys.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170426090907.q5jj3ywsvldsbq7n@XZHOUW.usersys.redhat.com> Sender: owner-linux-mm@kvack.org List-ID: On Wed, Apr 26, 2017 at 05:09:07PM +0800, Xiong Zhou wrote: > On Tue, Apr 25, 2017 at 02:51:06PM -0600, Ross Zwisler wrote: <> > > + /* > > + * Try and use the mmap to read back the data we just wrote with > > + * pwrite(). If the kernel bug is present the mapping from the 2MiB > > + * zero page will still be intact, and we'll read back zeros instead. > > + */ > > + if (strncmp(buffer, data, strlen(buffer))) { > > + fprintf(stderr, "strncmp mismatch: '%s' vs '%s'\n", buffer, > > + data); > munmap > close(fd); > > + exit(1); > > + } > > + > munmap Yep, thanks, fixed in v3. -- 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