lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 30 Nov 2015 15:35:09 -0600
From:	Doug Goldstein <cardoe@...doe.com>
To:	linux-kernel@...r.kernel.org
Cc:	xen-devel@...ts.xenproject.org,
	David Vrabel <david.vrabel@...rix.com>,
	Boris Ostrovsky <boris.ostrovsky@...cle.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
	Doug Goldstein <cardoe@...doe.com>
Subject: [PATCH 1/2] xen: wrap xenbus on xenfs with COMPAT option

Since Xen 4.6.0, using xenbus via xenfs (/proc/xen/xenbus) is deprecated
and /dev/xen/xenbus via pvops is used instead. This is an effort to
eventually drop this interface after a reasonable amount of time.

Signed-off-by: Doug Goldstein <cardoe@...doe.com>
---
 drivers/xen/Kconfig       | 12 ++++++++++++
 drivers/xen/xenfs/super.c | 10 ++++++++--
 2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig
index 73708ac..7003984 100644
--- a/drivers/xen/Kconfig
+++ b/drivers/xen/Kconfig
@@ -123,6 +123,18 @@ config XEN_COMPAT_XENFS
          a xen platform.
          If in doubt, say yes.
 
+config XEN_COMPAT_XENFS_XENBUS
+	bool "xenbus accessible from xenfs"
+	depends on XENFS
+	default y
+	help
+	  Since Xen 4.6.0, xenstore will prefer to use the /dev/xen/xenbus
+	  device over the "xenbus" interface on the xenfs filesystem.
+	  Selecting this causes the kernel to include the "xenbus"
+	  interface on the xenfs filesystem and you can safely say no for
+	  Xen 4.6.0 and newer.
+	  If in doubt, say yes.
+
 config XEN_SYS_HYPERVISOR
        bool "Create xen entries under /sys/hypervisor"
        depends on SYSFS
diff --git a/drivers/xen/xenfs/super.c b/drivers/xen/xenfs/super.c
index 8559a71..86ff5b3 100644
--- a/drivers/xen/xenfs/super.c
+++ b/drivers/xen/xenfs/super.c
@@ -45,14 +45,20 @@ static const struct file_operations capabilities_file_ops = {
 static int xenfs_fill_super(struct super_block *sb, void *data, int silent)
 {
 	static struct tree_descr xenfs_files[] = {
-		[2] = { "xenbus", &xen_xenbus_fops, S_IRUSR|S_IWUSR },
+		[2] =
+#ifdef CONFIG_XEN_COMPAT_XENFS_XENBUS
+		{ "xenbus", &xen_xenbus_fops, S_IRUSR|S_IWUSR },
+#endif
 		{ "capabilities", &capabilities_file_ops, S_IRUGO },
 		{ "privcmd", &xen_privcmd_fops, S_IRUSR|S_IWUSR },
 		{""},
 	};
 
 	static struct tree_descr xenfs_init_files[] = {
-		[2] = { "xenbus", &xen_xenbus_fops, S_IRUSR|S_IWUSR },
+		[2] =
+#ifdef CONFIG_XEN_COMPAT_XENFS_XENBUS
+		{ "xenbus", &xen_xenbus_fops, S_IRUSR|S_IWUSR },
+#endif
 		{ "capabilities", &capabilities_file_ops, S_IRUGO },
 		{ "privcmd", &xen_privcmd_fops, S_IRUSR|S_IWUSR },
 		{ "xsd_kva", &xsd_kva_file_ops, S_IRUSR|S_IWUSR},
-- 
2.4.10

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists