]> git.baikalelectronics.ru Git - kernel.git/commit
x86/MSR: Filter MSR writes through X86_IOC_WRMSR_REGS ioctl too
authorMisono Tomohiro <misono.tomohiro@jp.fujitsu.com>
Wed, 27 Jan 2021 12:24:56 +0000 (21:24 +0900)
committerBorislav Petkov <bp@suse.de>
Wed, 27 Jan 2021 18:06:47 +0000 (19:06 +0100)
commit02a16aa13574c8526beadfc9ae8cc9b66315fa2d
tree36bcd705c1ceaa52cb9bcebab2192acbd079fcd0
parent443121b3ebb9025fd99ff11851d3537cb756d456
x86/MSR: Filter MSR writes through X86_IOC_WRMSR_REGS ioctl too

Commit

  a7e1f67ed29f ("x86/msr: Filter MSR writes")

introduced a module parameter to disable writing to the MSR device file
and tainted the kernel upon writing. As MSR registers can be written by
the X86_IOC_WRMSR_REGS ioctl too, the same filtering and tainting should
be applied to the ioctl as well.

 [ bp: Massage commit message and space out statements. ]

Fixes: a7e1f67ed29f ("x86/msr: Filter MSR writes")
Signed-off-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20210127122456.13939-1-misono.tomohiro@jp.fujitsu.com
arch/x86/kernel/msr.c