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:	Wed, 10 Apr 2013 09:08:17 -0700
From:	"K. Y. Srinivasan" <kys@...rosoft.com>
To:	gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org,
	devel@...uxdriverproject.org, olaf@...fle.de, apw@...onical.com,
	jasowang@...hat.com
Cc:	"K. Y. Srinivasan" <kys@...rosoft.com>
Subject: [PATCH 1/1] Drivers: hv: vmbus: Add additional distro specific Kconfig options

The guest ID captures information about the guest and has room for
distributions to add distro specific information. Add Kconfig options
to support distro specific information to be managed easily.

Signed-off-by: K. Y. Srinivasan <kys@...rosoft.com>
---
 drivers/hv/Kconfig        |   14 ++++++++++++++
 drivers/hv/hv.c           |    4 +++-
 drivers/hv/hyperv_vmbus.h |    2 +-
 3 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/drivers/hv/Kconfig b/drivers/hv/Kconfig
index 0403b51..d2ca9c7 100644
--- a/drivers/hv/Kconfig
+++ b/drivers/hv/Kconfig
@@ -19,4 +19,18 @@ config HYPERV_BALLOON
 	help
 	  Select this option to enable Hyper-V Balloon driver.
 
+config HYPERV_GUEST_D1
+	hex "Distro specific information"
+	range 0x00 0xff
+	default 0
+	help
+	  This specifies the Distro vendor
+
+config HYPERV_GUEST_D2
+	hex "Additional Distro specific information"
+	range 0x0000 0xffff
+	default 0
+	help
+	  Additional Distro specific kernel version information
+
 endmenu
diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
index ae49237..7bd2e88 100644
--- a/drivers/hv/hv.c
+++ b/drivers/hv/hv.c
@@ -148,7 +148,9 @@ int hv_init(void)
 	/*
 	 * Write our OS ID.
 	 */
-	hv_context.guestid = generate_guest_id(0, LINUX_VERSION_CODE, 0);
+	hv_context.guestid = generate_guest_id(HYPERV_GUEST_D1,
+						LINUX_VERSION_CODE,
+						HYPERV_GUEST_D2);
 	wrmsrl(HV_X64_MSR_GUEST_OS_ID, hv_context.guestid);
 
 	/* See if the hypercall page is already set */
diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h
index 12f2f9e..8c9ebd0 100644
--- a/drivers/hv/hyperv_vmbus.h
+++ b/drivers/hv/hyperv_vmbus.h
@@ -410,7 +410,7 @@ enum {
  *
  * Bit(s)
  * 63 - Indicates if the OS is Open Source or not; 1 is Open Source
- * 62:56 - Os Type; Linux is 0x100
+ * 62:56 - Os Type; Linux is 0x1
  * 55:48 - Distro specific identification
  * 47:16 - Linux kernel version number
  * 15:0  - Distro specific identification
-- 
1.7.4.1

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