All of lore.kernel.org
 help / color / mirror / Atom feed
From: akpm@linux-foundation.org
To: dan.j.williams@intel.com, hch@lst.de, jack@suse.cz,
	jmoyer@redhat.com, kirill.shutemov@linux.intel.com,
	mhocko@suse.com, ross.zwisler@linux.intel.com,
	mm-commits@vger.kernel.org
Subject: [to-be-updated] dax-disable-filesystem-dax-on-devices-that-do-not-map-pages.patch removed from -mm tree
Date: Wed, 04 Oct 2017 14:56:04 -0700	[thread overview]
Message-ID: <59d558f4.YnGLmJP2UPQHfdKr%akpm@linux-foundation.org> (raw)


The patch titled
     Subject: dax: disable filesystem dax on devices that do not map pages
has been removed from the -mm tree.  Its filename was
     dax-disable-filesystem-dax-on-devices-that-do-not-map-pages.patch

This patch was dropped because an updated version will be merged

------------------------------------------------------
From: Dan Williams <dan.j.williams@intel.com>
Subject: dax: disable filesystem dax on devices that do not map pages

If a dax buffer from a device that does not map pages is passed to read(2)
or write(2) as a target for direct-I/O it triggers SIGBUS.  If gdb
attempts to examine the contents of a dax buffer from a device that does
not map pages it triggers SIGBUS.  If fork(2) is called on a process with
a dax mapping from a device that does not map pages it triggers SIGBUS. 
'struct page' is required otherwise several kernel code paths break in
surprising ways.  Disable filesystem-dax on devices that do not map pages.

Link: http://lkml.kernel.org/r/150664807247.36094.11168730579639072446.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Jeff Moyer <jmoyer@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/dax/super.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff -puN drivers/dax/super.c~dax-disable-filesystem-dax-on-devices-that-do-not-map-pages drivers/dax/super.c
--- a/drivers/dax/super.c~dax-disable-filesystem-dax-on-devices-that-do-not-map-pages
+++ a/drivers/dax/super.c
@@ -15,6 +15,7 @@
 #include <linux/mount.h>
 #include <linux/magic.h>
 #include <linux/genhd.h>
+#include <linux/pfn_t.h>
 #include <linux/cdev.h>
 #include <linux/hash.h>
 #include <linux/slab.h>
@@ -123,6 +124,12 @@ int __bdev_dax_supported(struct super_bl
 		return len < 0 ? len : -EIO;
 	}
 
+	if (!pfn_t_has_page(pfn)) {
+		pr_debug("VFS (%s): error: dax support not enabled\n",
+				sb->s_id);
+		return -EOPNOTSUPP;
+	}
+
 	return 0;
 }
 EXPORT_SYMBOL_GPL(__bdev_dax_supported);
_

Patches currently in -mm which might be from dan.j.williams@intel.com are

dax-stop-using-vm_mixedmap-for-dax.patch
dax-stop-using-vm_hugepage-for-dax.patch


                 reply	other threads:[~2017-10-04 21:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=59d558f4.YnGLmJP2UPQHfdKr%akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=dan.j.williams@intel.com \
    --cc=hch@lst.de \
    --cc=jack@suse.cz \
    --cc=jmoyer@redhat.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhocko@suse.com \
    --cc=mm-commits@vger.kernel.org \
    --cc=ross.zwisler@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.