Merge pull request #65 from tSte/update-msr-access-restriction-message

Update MSR access restriction message
This commit is contained in:
Francesco Palmarini
2018-11-06 10:33:49 +01:00
committed by GitHub
2 changed files with 3 additions and 2 deletions

View File

@@ -33,8 +33,9 @@ On a lot of modern CPUs from Intel one can configure the TDP up or down based on
## Requirements ## Requirements
A stripped down version of the python module `python-periphery` is now built-in and it is used for accessing the MCHBAR register by memory mapped I/O. You also need `dbus` and `gobject` python bindings for listening to dbus signals on resume from sleep/hibernate. A stripped down version of the python module `python-periphery` is now built-in and it is used for accessing the MCHBAR register by memory mapped I/O. You also need `dbus` and `gobject` python bindings for listening to dbus signals on resume from sleep/hibernate.
### Secure Boot ### Writing to MSR and PCI BAR
Right now it is mandatory to **disable Secure Boot** (in BIOS) in order to avoid [Kernel Lockdown](https://lwn.net/Articles/706637/). In particular Lockdown restricts access to MSR and PCI BAR (via /dev/mem) which are required by this script. Right now it is mandatory to **disable Secure Boot** (in BIOS) in order to avoid [Kernel Lockdown](https://lwn.net/Articles/706637/). In particular Lockdown restricts access to MSR and PCI BAR (via /dev/mem) which are required by this script.
Note that some kernels (e.g. [linux-hardened](https://www.archlinux.org/packages/extra/x86_64/linux-hardened/)) will prevent from writing to `/dev/mem` too.
### Thermald ### Thermald
As discovered by *DEvil0000* the Linux Thermal Monitor ([thermald](https://github.com/intel/thermal_daemon)) can conflict with the purpose of this script. In particular, thermald might be pre-installed (e.g. on Ubuntu) and configured in such a way to keep the CPU temperature below a certain threshold (~80 'C) by applying throtthling or messing up with RAPL or other CPU-specific registers. I strongly suggest to either disable/uninstall it or to review its default configuration. As discovered by *DEvil0000* the Linux Thermal Monitor ([thermald](https://github.com/intel/thermal_daemon)) can conflict with the purpose of this script. In particular, thermald might be pre-installed (e.g. on Ubuntu) and configured in such a way to keep the CPU temperature below a certain threshold (~80 'C) by applying throtthling or messing up with RAPL or other CPU-specific registers. I strongly suggest to either disable/uninstall it or to review its default configuration.

View File

@@ -93,7 +93,7 @@ def writemsr(msr, val):
os.close(f) os.close(f)
except (IOError, OSError) as e: except (IOError, OSError) as e:
if e.errno == EPERM or e.errno == EACCES: if e.errno == EPERM or e.errno == EACCES:
print('[E] Unable to write to MSR. Try to disable Secure Boot.') print('[E] Unable to write to MSR. Try to disable Secure Boot and check if your kernel does not restrict access to MSR.')
sys.exit(1) sys.exit(1)
else: else:
raise e raise e