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>] [day] [month] [year] [list]
Date:	Fri,  3 Aug 2012 19:26:38 +0100
From:	julian.pidancet@...il.com
To:	linux-kernel@...r.kernel.org
Cc:	maze@...gle.com, ycheng@...gle.com, edumazet@...gle.com,
	davem@...emloft.net, xen-devel@...ts.xen.org,
	Julian Pidancet <julian.pidancet@...rix.com>
Subject: [RFC PATCH] Introduce V4V socket family for inter-virtual machines communication

From: Julian Pidancet <julian.pidancet@...rix.com>

V4V is an hypervisor based inter domain-communication system beeing
developed for the Xen hypervisor.

I am currently working on a kernel socket family implementation of this
protocol and realized that socket family numbers were allocated
statically. It basically makes it impossible to create a new socket
family without having to modify the include/linux/socket.h and bump the
AF_MAX definition beforehand. (Any attempt to call sock_register() with
a family value greater than or equal to AF_MAX will fail).

Therefore I am submitting this RFC patch to find out wether it would be
acceptable to add a new socket family in the AF list without breaking
compatibility.

The socket family introduced in this patch is called AF_V4V, which
implies that the family would be Xen specific. But we can also consider
adding a more generic, hypervisor agnostic socket family, which enables
inter-VM communication.

Signed-off-by: Julian Pidancet <julian.pidancet@...rix.com>
---
 include/linux/socket.h |    4 +++-
 include/linux/v4v.h    |   27 +++++++++++++++++++++++++++
 2 files changed, 30 insertions(+), 1 deletions(-)
 create mode 100644 include/linux/v4v.h

diff --git a/include/linux/socket.h b/include/linux/socket.h
index ba7b2e8..5e879d0 100644
--- a/include/linux/socket.h
+++ b/include/linux/socket.h
@@ -195,7 +195,8 @@ struct ucred {
 #define AF_CAIF		37	/* CAIF sockets			*/
 #define AF_ALG		38	/* Algorithm sockets		*/
 #define AF_NFC		39	/* NFC sockets			*/
-#define AF_MAX		40	/* For now.. */
+#define AF_V4V		40	/* Inter virtual domain sockets */
+#define AF_MAX		41	/* For now.. */
 
 /* Protocol families, same as address families. */
 #define PF_UNSPEC	AF_UNSPEC
@@ -238,6 +239,7 @@ struct ucred {
 #define PF_CAIF		AF_CAIF
 #define PF_ALG		AF_ALG
 #define PF_NFC		AF_NFC
+#define PF_V4V		AF_V4V
 #define PF_MAX		AF_MAX
 
 /* Maximum queue length specifiable by listen.  */
diff --git a/include/linux/v4v.h b/include/linux/v4v.h
new file mode 100644
index 0000000..172f67f
--- /dev/null
+++ b/include/linux/v4v.h
@@ -0,0 +1,27 @@
+/*
+ * linux/v4v.h
+ *
+ * Definitions for V4V network layer
+ *
+ * Authors: Julian Pidancet <julian.pidancet@...rix.com>
+ * Copyright (c) 2012 Citrix Systems
+ * All rights reserved.
+ *
+ */
+#ifndef V4V_KERNEL_H
+#define V4V_KERNEL_H
+
+#include <linux/types.h>
+#include <linux/socket.h>
+
+typedef struct {
+        __u32                   port;
+        __u16                   domain;
+} v4v_address;
+
+struct sockaddr_v4v {
+        __kernel_sa_family_t    sv4v_family;
+        v4v_address             sv4v_addr;
+};
+
+#endif /* V4V_KERNEL_H */
-- 
Julian Pidancet

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ