I'm trying to undervolt my CPU on a Intel Skylake machine running Ubuntu 18.04 / kernel 4.18.0-16 in Secure Boot mode and need to read/write MSR 0x150. I have signed and loaded the msr.ko kernel module, but can't run the executables rdmsr and wrmsr from msr-tools, even as root / super user (I get permission errors). What I grasp is that with newer kernels (> 3.7?) you can't access the MSRs from user space. There are workarounds described: I tried setting "setcap cap_sys_rawio+ep" for both rdmsr and wrmsr, but that didn't help. I'm using the tools iuvolt and undervolt, but also tried wrmsr directly.
How can I execute rdmsr / wrmsr in secure boot mode?
Here and here is some info and an old patch to make it work with Secure boot. But the code is totally different now.