Re: [PATCH] x86: prevent unconditional writes to DebugCtl MSR
From: Roland McGrath
Date: Fri Apr 18 2008 - 15:44:19 EST
I don't think this was a good idea:
commit 5b0e508415a83989fe704b4718a1a214bc333ca7
Author: Jan Beulich <jbeulich@xxxxxxxxxx>
Date: Mon Mar 10 13:11:17 2008 +0000
x86: prevent unconditional writes to DebugCtl MSR
It's already a bug if there is any unconditional use of the MSR.
Silenting ignoring it is just wrong.
There was such a bug before this fix:
commit 4ba51fd75cc3789be83f0d6f878dabbb0cb19bca
Author: Roland McGrath <roland@xxxxxxxxxx>
Date: Thu Apr 3 14:18:55 2008 -0700
x86 ptrace: avoid unnecessary wrmsr
But there should not be any more. The use of the MSR for block-step is
controlled by arch_has_block_step(), which uses the same condition. Any
use of the MSR for other purposes (DS et al) should be controlled by more
specific CPU model checks.
If TIF_DEBUGCTLMSR is ever set on a machine without the support, that is a
bug we should diagnose earlier. If you want some paranoia, then keep
update_debugctlmsr but make it do:
BUG_ON(boot_cpu_data.x86 < 6);
instead.
Thanks,
Roland
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/