kvm-ok tries to load kernel mod before checking if it is running under root

Bug #717342 reported by C de-Avillez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cpu-checker (Ubuntu)
Fix Released
High
Dustin Kirkland 

Bug Description

Binary package hint: cpu-checker

(found by a mistake -- wanted to run it on a different machine, and forgot to run as root):

[cerdea-aws]cerdea@xango3:/src/buildd/kernel-tests/kernel-sru$ kvm-ok
FATAL: Error inserting msr (/lib/modules/2.6.38-3-generic/kernel/arch/x86/kernel/msr.ko): Operation not permitted
[cerdea-aws]cerdea@xango3:/src/buildd/kernel-tests/kernel-sru$ uname -a
Linux xango3 2.6.38-3-generic #30-Ubuntu SMP Thu Feb 10 00:33:26 UTC 2011 x86_64 GNU/Linux
[cerdea-aws]cerdea@xango3:/src/buildd/kernel-tests/kernel-sru$ sudo kvm-ok
[sudo] password for cerdea:
INFO: Your CPU supports KVM extensions
INFO: /dev/kvm exists
KVM acceleration can be used
[cerdea-aws]cerdea@xango3:/src/buildd/kernel-tests/kernel-sru$ kvm-ok
You must be root to run this check.
[cerdea-aws]cerdea@xango3:/src/buildd/kernel-tests/kernel-sru$

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: cpu-checker 0.2-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.38-3.30-generic 2.6.38-rc4
Uname: Linux 2.6.38-3-generic x86_64
NonfreeKernelModules: wl
Architecture: amd64
Date: Fri Feb 11 12:41:50 2011
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Alpha amd64 (20110201.2)
PackageArchitecture: all
SourcePackage: cpu-checker

Revision history for this message
C de-Avillez (hggdh2) wrote :
Revision history for this message
C de-Avillez (hggdh2) wrote :

kvm-ok has a 'set -e' at the beginning. Do we really need it?

Changed in cpu-checker (Ubuntu):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Dustin Kirkland (kirkland)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cpu-checker - 0.3-0ubuntu1

---------------
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 <email address hidden> Sat, 26 Feb 2011 18:01:44 -0600

Changed in cpu-checker (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.