Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/softdevteam/user_rdpmc
Enable RDPMC from Linux userspace.
https://github.com/softdevteam/user_rdpmc
Last synced: 6 days ago
JSON representation
Enable RDPMC from Linux userspace.
- Host: GitHub
- URL: https://github.com/softdevteam/user_rdpmc
- Owner: softdevteam
- License: other
- Created: 2016-08-23T15:53:40.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-08-23T16:24:50.000Z (about 8 years ago)
- Last Synced: 2024-04-24T03:43:51.222Z (7 months ago)
- Language: C
- Homepage:
- Size: 7.81 KB
- Stars: 8
- Watchers: 8
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
The user_rdpmc Linux Kernel Module
==================================A simple Linux kernel module which, when loaded, allows ring 3 (userspace)
programs to use the `RDPMC` assembler instruction by flipping the `PMC` flag in
the `CR4` register.This module only makes sense on an x86 machine.
Building
--------Install Linux kernel headers and run `make`.
The build currently assumes a Debian Linux system. You may have to tweak some
paths in the Makefile for other distributions.Using
-----First run the `test_rdpmc` program and check that the program crashes, thus
confirming that the userspace cannot invoke `RDPMC`.Insert the module with `sudo insmod user_rdpmc.ko`. The dmesg buffer should
then display a message similar to:```
[ 5016.743382] Enabling RDPMC from ring 3 for 4 CPUs
```Now if you re-run the test program, it should not crash. Userspace can now
invoke `RDPMC`.If you remove the `user_rdpmc` module, userspace is then denied use of `RDPMC`.