summaryrefslogtreecommitdiffstats
path: root/drivers/misc/lkdtm/bugs.c
diff options
context:
space:
mode:
authorXiaoyao Li <xiaoyao.li@intel.com>2020-03-25 11:09:23 +0800
committerThomas Gleixner <tglx@linutronix.de>2020-03-27 11:43:29 +0100
commitdbaba47085b0c2aa793ce849750164bd3765e163 (patch)
treea398007467f441d2f871fba4c150e8a04fa016ca /drivers/misc/lkdtm/bugs.c
parent6650cdd9a8ccf00555dbbe743d58541ad8feb6a7 (diff)
downloadlinux-dbaba47085b0c2aa793ce849750164bd3765e163.tar.bz2
x86/split_lock: Rework the initialization flow of split lock detection
Current initialization flow of split lock detection has following issues: 1. It assumes the initial value of MSR_TEST_CTRL.SPLIT_LOCK_DETECT to be zero. However, it's possible that BIOS/firmware has set it. 2. X86_FEATURE_SPLIT_LOCK_DETECT flag is unconditionally set even if there is a virtualization flaw that FMS indicates the existence while it's actually not supported. Rework the initialization flow to solve above issues. In detail, explicitly clear and set split_lock_detect bit to verify MSR_TEST_CTRL can be accessed, and rdmsr after wrmsr to ensure bit is cleared/set successfully. X86_FEATURE_SPLIT_LOCK_DETECT flag is set only when the feature does exist and the feature is not disabled with kernel param "split_lock_detect=off" On each processor, explicitly updating the SPLIT_LOCK_DETECT bit based on sld_sate in split_lock_init() since BIOS/firmware may touch it. Originally-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lkml.kernel.org/r/20200325030924.132881-2-xiaoyao.li@intel.com
Diffstat (limited to 'drivers/misc/lkdtm/bugs.c')
0 files changed, 0 insertions, 0 deletions