LKML Archive on
help / color / mirror / Atom feed
From: Roland McGrath <>
To: Ingo Molnar <>, Thomas Gleixner <>
Cc: Jan Beulich <>,
Subject: Re: [PATCH] x86: prevent unconditional writes to DebugCtl MSR
Date: Fri, 18 Apr 2008 12:43:34 -0700 (PDT)	[thread overview]
Message-ID: <20080418194334.7483627037C@magilla.localdomain> (raw)

I don't think this was a good idea:

	commit 5b0e508415a83989fe704b4718a1a214bc333ca7
	Author: Jan Beulich <>
	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 <>
	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);



             reply	other threads:[~2008-04-18 19:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-18 19:43 Roland McGrath [this message]
2008-04-21 15:55 ` Ingo Molnar
2008-04-21 16:34   ` Jan Beulich
2008-04-21 21:30     ` Roland McGrath
  -- strict thread matches above, loose matches on Subject: below --
2008-03-10 13:11 Jan Beulich
2008-03-10 15:56 ` Andi Kleen
2008-03-10 17:14 ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080418194334.7483627037C@magilla.localdomain \ \ \ \ \ \
    --subject='Re: [PATCH] x86: prevent unconditional writes to DebugCtl MSR' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).