You are not logged in.

#1 2014-01-17 15:56:30

From: The Accumulator
Registered: 2014-01-17
Posts: 4

[SOLVED] msr module missing [grsec kernel]


Firstly, hello to you all. Feels good being here. I am not new to Linux/Arch, just new to these forums.

Ok now for the issue. I use the grsec kernel from the AUR and I am running the latest as for now.
When I run i7z as root, All I see is:

i7z DEBUG: i7z version: svn-r77-(20-Nov-2011)
i7z DEBUG: Found Intel Processor
i7z DEBUG:    Stepping 7
i7z DEBUG:    Model a
i7z DEBUG:    Family 6
i7z DEBUG:    Processor Type 0
i7z DEBUG:    Extended Model 2
i7z DEBUG: msr = Model Specific Register
i7z DEBUG: Detected an i3/i5/i7 - 32nm (sandy bridge - 2nd generation core)
i7z DEBUG: msr device files exist /dev/cpu/*/msr
i7z DEBUG: You have write permissions to msr device files
modprobe: FATAL: Module msr not found.

followed by some usual debug info and then a ncurses gui with just 3 lines of information displaying the freq from cpuinfo and true frequency.
Also, running powertop yeilds:

unknown op '{'
                read_msr cpu0 0xe8 : No such device or address

Here is the kernel config:

"journalctl -f" shows nothing about permission being denied to i7z or powertop.

Am I missing something?

Running on a non grsec kernel (Arch's vanilla) shows proper detail [core frequencies, C state times etc etc] without the msr module missing error. Powertop also works fine there.

Laptop - ASUS K53SV
CPU - i7 2670QM

Any help would be appreciated. Thanks

Last edited by sandm4n (2014-01-19 06:29:54)


#2 2014-01-17 18:06:02

Registered: 2004-06-20
Posts: 1,133

Re: [SOLVED] msr module missing [grsec kernel]

Does the grsec kernel include the msr module? If not, the fix is simple enough. If it does, I'd assume the kernel blocks a certain call that the app needs; can't you debug what is being blocked? (maybe strace can tell you)

Last edited by Spider.007 (2014-01-17 18:07:41)


#3 2014-01-17 18:40:08

From: The Accumulator
Registered: 2014-01-17
Posts: 4

Re: [SOLVED] msr module missing [grsec kernel]

Thanks for the suggestions.

I tried strace but all seems normal. The msr module just doesn't exist!

I grepd through the kernel config and all I find is:


which seems to be set. Can anyone who is running grsec kernel try replicating the issue by running i7z or powertop?

EDIT: I think I might have found out the issue. After going through Arch's vannila kernel config, I find there is an extra variable:


This I believe might be the key. Will try adding this in to grsec's config and recompiling. Will post back the results.

UPDATE: No luck!

But a bit more research reveals this:


If you say Y here, /dev/kmem and /dev/mem won't be allowed to
be written to or read from to modify or leak the contents of the running
kernel.  /dev/port will also not be allowed to be opened and support
for /dev/cpu/*/msr will be removed
.  If you have module
support disabled, enabling this will close up five ways that are
currently used  to insert malicious code into the running kernel.

Even with all these features enabled, we still highly recommend that
you use the RBAC system, as it is still possible for an attacker to
modify the running kernel through privileged I/O granted by ioperm/iopl.

If you are not using XFree86, you may be able to stop this additional
case by enabling the 'Disable privileged I/O' option. Though nothing
legitimately writes to /dev/kmem, XFree86 does need to write to /dev/mem,
but only to video memory, which is the only writing we allow in this
case.  If /dev/kmem or /dev/mem are mmaped without PROT_WRITE, they will
not be allowed to mprotect it with PROT_WRITE later.
Enabling this feature will prevent the "cpupower" and "powertop" tools
from working.

It is highly recommended that you say Y here if you meet all the
conditions above.

UPDATE2: FIXED! GRKERNSEC_KMEM was the flag. I7z and powertop now working. Marking thread as solved.

Last edited by sandm4n (2014-01-19 06:28:49)


Board footer

Powered by FluxBB