debian/0000775000000000000000000000000012301254614007166 5ustar debian/source/0000775000000000000000000000000012301254614010466 5ustar debian/source/format0000664000000000000000000000001412301254004011665 0ustar 3.0 (quilt) debian/copyright0000664000000000000000000000246112301254004011115 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: CPU-Checker Upstream-Contact: Kees Cook Source: https://edge.launchpad.net/cpu-checker Files: * Copyright: 2009-2013, Canonical Ltd. 2009-2013, Kees Cook 2009-2013, Dustin Kirkland 2010-2013, Steve Beattie 2010-2013, Jamie Strandboge License: GPL-3+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA . On Debian systems, the full text of the GNU General Public License version 3 can be found in the file `/usr/share/common-licenses/GPL-3'. debian/changelog0000664000000000000000000000576312301254455011056 0ustar cpu-checker (0.7-0ubuntu4) trusty; urgency=medium [ dann frazier ] * Add support for arm64. (LP: #1282329) [ Dimitri John Ledkov ] * Assume ppc64el is kvm capable. -- Dimitri John Ledkov Thu, 20 Feb 2014 01:23:41 +0000 cpu-checker (0.7-0ubuntu3) saucy; urgency=low * d/p/arm: add support for ARM Cortex-A15 systems (LP: #1194632). Thanks to dann frazier. * d/control: add armhf architecture, but restrict msr-tools dependency to x86. -- Robie Basak Wed, 18 Sep 2013 13:53:45 +0000 cpu-checker (0.7-0ubuntu2) saucy; urgency=low * debian/compat: Change to "9" * debian/control: - Update debhelper to version 9 - Update standards version to 3.9.4 * Create debian/source/format as 3.0 (quilt) * debian/copyright: - use debian machine readable format 1.0 - bump copyright year to 2013 * debian/rules: add option for verbose mode -- Jackson Doak Thu, 15 Aug 2013 18:49:24 +1000 cpu-checker (0.7-0ubuntu1) precise; urgency=low [ Colin Watson ] * debian/control: mark as "Architecture: amd64 i386", since this package is uninstallable on all other architectures (LP: #888087). [ Kees Cook ] * debian/control: fix VCS fields (LP: #888082). -- Kees Cook Fri, 18 Nov 2011 10:11:52 -0800 cpu-checker (0.6-0ubuntu1) oneiric; urgency=low * kvm-ok: LP: #843972 - fix conflicting, misleading messages and erroneous verdict -- Dustin Kirkland Thu, 08 Sep 2011 14:31:19 -0700 cpu-checker (0.5-0ubuntu1) natty; urgency=low * kvm-ok: need to || true the statement that tests for kvm, as error conditions are detected below, and helpful messages are displayed; LP: #741080 -- Dustin Kirkland Wed, 23 Mar 2011 13:59:51 -0500 cpu-checker (0.4-0ubuntu1) natty; urgency=low * kvm-ok: fix $id bug; update brand detection; ensure that the root/msr stuff gets run -- Dustin Kirkland Sun, 27 Feb 2011 06:47:49 -0600 cpu-checker (0.3-0ubuntu1) natty; urgency=low * kvm-ok: exit informatively if we are not root before doing MSR checks; allows kvm-ok to continue being useful, even if not running as root, LP: #717342 * kvm-ok.1: document the new MSR check -- Dustin Kirkland Sat, 26 Feb 2011 18:15:25 -0600 cpu-checker (0.2-0ubuntu1) natty; urgency=low * kvm-ok: replace dmesg review with MSR tests. * check-bios-nx: replace model/family heuristic with MSR test. * Makefile: drop test suite, since it only applied to heuristics. -- Kees Cook Wed, 17 Nov 2010 11:11:24 -0800 cpu-checker (0.1-0ubuntu2) lucid; urgency=low * modify the modprobe HINT so it can be used (LP: #537674) -- Brian Murray Thu, 18 Mar 2010 10:26:18 -0700 cpu-checker (0.1-0ubuntu1) lucid; urgency=low * Initial release for utilities that used to live in qemu-kvm and update-notifier. -- Kees Cook Tue, 09 Mar 2010 13:40:55 -0800 debian/control0000664000000000000000000000154312301254423010572 0ustar Source: cpu-checker Section: utils Priority: optional Maintainer: Kees Cook Build-Depends: debhelper (>= 9) Standards-Version: 3.9.4 Homepage: https://launchpad.net/cpu-checker Vcs-Browser: https://code.launchpad.net/~cpu-checker-dev/cpu-checker/trunk Vcs-Bzr: lp:~cpu-checker-dev/cpu-checker/trunk Package: cpu-checker Architecture: amd64 arm64 armhf i386 ppc64el Depends: msr-tools [amd64 i386], ${shlibs:Depends}, ${misc:Depends} Conflicts: qemu-kvm (<< 0.12.3-0ubuntu13) Replaces: qemu-kvm (<< 0.12.3-0ubuntu13) Description: tools to help evaluate certain CPU (or BIOS) features There are some CPU features that are filtered or disabled by system BIOSes. This set of tools seeks to help identify when certain features are in this state, based on kernel values, CPU flags and other conditions. Supported feature tests are NX/XD and VMX/SVM. debian/rules0000775000000000000000000000015112301254004010234 0ustar #!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 %: dh $@ --parallel debian/patches/0000775000000000000000000000000012301254614010615 5ustar debian/patches/arm0000664000000000000000000000323512301254004011313 0ustar Author: dann frazier Description: Add support ARM Cortex-A15 systems Bug: https://launchpad.net/bugs/1194632 Bug-Ubuntu: https://launchpad.net/bugs/1194632 Forwarded: https://code.launchpad.net/~dannf/cpu-checker/arm-cortex-a15/+merge/171667 Last-Update: 2013-09-13 --- a/kvm-ok +++ b/kvm-ok @@ -39,10 +39,20 @@ fi } +ARM_CPU_PART_CORTEX_A15="0xc0f" # + # check cpu flags for capability -virt=$(egrep -m1 -w '^flags[[:blank:]]*:' /proc/cpuinfo | egrep -wo '(vmx|svm)') || true -[ "$virt" = "vmx" ] && brand="intel" -[ "$virt" = "svm" ] && brand="amd" +if [ "$(uname -m)" = "armv7l" ]; then + if egrep -m1 -w '^CPU part[[:blank:]]*:' /proc/cpuinfo | \ + egrep -wq "$ARM_CPU_PART_CORTEX_A15"; then + virt="ARM" + kvm_mod="kvm" + fi +else + virt=$(egrep -m1 -w '^flags[[:blank:]]*:' /proc/cpuinfo | egrep -wo '(vmx|svm)') || true + [ "$virt" = "vmx" ] && kvm_mod="kvm_intel" + [ "$virt" = "svm" ] && kvm_mod="kvm_amd" +fi if [ -z "$virt" ]; then echo "INFO: Your CPU does not support KVM extensions" @@ -56,7 +66,7 @@ verdict 0 else echo "INFO: /dev/kvm does not exist" - echo "HINT: sudo modprobe kvm_$brand" + echo "HINT: sudo modprobe $kvm_mod" fi assert_root @@ -66,7 +76,7 @@ if [ ! -r "$msr" ]; then modprobe msr fi -if [ ! -r "$msr" ]; then +if [ -e "$msr" -a ! -r "$msr" ]; then echo "You must be root to run this check." >&2 exit 2 fi @@ -90,6 +100,9 @@ if [ "$BIT" = "1" ]; then disabled=1 fi +elif [ "$virt" = "ARM" ]; then + # Should also test that we booted in HYP mode, if detectable + : else echo "FAIL: Unknown virtualization extension: $virt" verdict 1 debian/patches/arm64-ppc64el-dummy.patch0000664000000000000000000000165712301254573015210 0ustar Description: add (dummy) arm64 and ppc64el checks Bug-Ubuntu: https://bugs.launchpad.net/bugs/1282329 --- cpu-checker-0.7.orig/kvm-ok +++ cpu-checker-0.7/kvm-ok @@ -48,6 +48,14 @@ if [ "$(uname -m)" = "armv7l" ]; then virt="ARM" kvm_mod="kvm" fi +elif [ "$(uname -m)" = "aarch64" ]; then + virt="ARM" + kvm_mod="kvm" +elif [ "$(uname -m)" = "ppc64le" ]; then + # FIXME: Assume that all ppc64el is kvm capable + exit 0 + virt="POWER" + kvm_mod="kvm" else virt=$(egrep -m1 -w '^flags[[:blank:]]*:' /proc/cpuinfo | egrep -wo '(vmx|svm)') || true [ "$virt" = "vmx" ] && kvm_mod="kvm_intel" @@ -103,6 +111,9 @@ elif [ "$virt" = "svm" ]; then elif [ "$virt" = "ARM" ]; then # Should also test that we booted in HYP mode, if detectable : +elif [ "$virt" = "POWER" ]; then + # Should also test that we booted in HYP mode, if detectable + : else echo "FAIL: Unknown virtualization extension: $virt" verdict 1 debian/patches/series0000664000000000000000000000003612301254543012032 0ustar arm arm64-ppc64el-dummy.patch debian/compat0000664000000000000000000000000212301254004010355 0ustar 9