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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 29 Jun 2010 17:25:10 -0400
From:	Chetan Loke <chetanloke@...il.com>
To:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	virtualization@...ts.linux-foundation.org, kvm@...r.kernel.org,
	chetanloke@...il.com
Subject: Hypervisor detection from within a Linux VM

Hello,


Requirement:
I have the need to support my apps(running on a Linux VM) on different
*nix hypervisors(ESX/Xen etc). I need to know on which hypervisor my
app is running. I read the CPUID usage thread -
http://thread.gmane.org/gmane.comp.emulators.kvm.devel/22643 but to be
honest in the end I looked at
http://lxr.linux.no/#linux+v2.6.34/arch/x86/kernel/cpu/vmware.c#L88
The vmware_platform() detection code is straight forward.

Current-hack:
As a quick hack we just grep lspci for VMware's pci-ids.

Solution:
I can write a bare minimal driver, check the cpu-id as VMware's
balloon driver does and then emit a proc/sysfs node. The setup
packages and the apps can then check for this node-string.I'm
currently working on ESX and I am hoping that this thin-driver will
work.

Question:
Q1)Is it possible to get this functionality as part of the stock
kernel or is that a bad idea? I suspect there could be other
users/apps who would need to know what *nix hypervisor(or a
non-virtualized environment) they are
running on?
Q2)If this is not the right approach then can someone please suggest
another approach?

Regards
Chetan Loke
--
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