summaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorBorislav Petkov <bp@suse.de>2020-06-10 21:37:49 +0200
committerBorislav Petkov <bp@suse.de>2020-06-25 10:39:02 +0200
commita7e1f67ed29f0c339e2aa7483d13b085127566ab (patch)
tree10b7e9527a98dce6e5a008d2c99603dc12a2af05 /sound/soc
parentb3a9e3b9622ae10064826dccb4f7a52bd88c7407 (diff)
x86/msr: Filter MSR writesx86-misc-2020-08-03
Add functionality to disable writing to MSRs from userspace. Writes can still be allowed by supplying the allow_writes=on module parameter. The kernel will be tainted so that it shows in oopses. Having unfettered access to all MSRs on a system is and has always been a disaster waiting to happen. Think performance counter MSRs, MSRs with sticky or locked bits, MSRs making major system changes like loading microcode, MTRRs, PAT configuration, TSC counter, security mitigations MSRs, you name it. This also destroys all the kernel's caching of MSR values for performance, as the recent case with MSR_AMD64_LS_CFG showed. Another example is writing MSRs by mistake by simply typing the wrong MSR address. System freezes have been experienced that way. In general, poking at MSRs under the kernel's feet is a bad bad idea. So log writing to MSRs by default. Longer term, such writes will be disabled by default. If userspace still wants to do that, then proper interfaces should be defined which are under the kernel's control and accesses to those MSRs can be synchronized and sanitized properly. [ Fix sparse warnings. ] Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Borislav Petkov <bp@suse.de> Tested-by: Sean Christopherson <sean.j.christopherson@intel.com> Link: https://lkml.kernel.org/r/20200612105026.GA22660@zn.tnic
Diffstat (limited to 'sound/soc')
0 files changed, 0 insertions, 0 deletions