2008-07-22 12:10:07

by Jan Kratochvil

[permalink] [raw]
Subject: [patch] Fix crash due to missing debugctlmsr on AMD K6-3

Signed-off-by: Jan Kratochvil <[email protected]>

--- linux-2.6.26/arch/x86/Kconfig.cpu-orig 2008-07-13 23:51:29.000000000 +0200
+++ linux-2.6.26/arch/x86/Kconfig.cpu 2008-07-22 13:44:19.000000000 +0200
@@ -414,4 +414,4 @@ config X86_MINIMUM_CPU_FAMILY

config X86_DEBUGCTLMSR
def_bool y
- depends on !(M586MMX || M586TSC || M586 || M486 || M386)
+ depends on !(MK6 || MWINCHIPC6 || MWINCHIP2 || MWINCHIP3D || MCYRIXIII || M586MMX || M586TSC || M586 || M486 || M386)


Attachments:
(No filename) (480.00 B)
linux-2.6.26-debugctlmsr-k6.patch (480.00 B)
Download all attachments

2008-07-22 12:18:18

by Ingo Molnar

[permalink] [raw]
Subject: Re: [patch] Fix crash due to missing debugctlmsr on AMD K6-3


* Jan Kratochvil <[email protected]> wrote:

> Hi,
>
> currently if you use PTRACE_SINGLEBLOCK on AMD K6-3 (i586) it will
> crash. Kernel now wrongly assumes existing DEBUGCTLMSR MSR register
> there.
>
> Removed the assumption also for some other non-K6 CPUs but I am not
> sure there (but it can only bring small inefficiency there if my
> assumption is wrong).
>
> Based on info from Roland McGrath, Chuck Ebbert and Mikulas Patocka.
> More info at:
> https://bugzilla.redhat.com/show_bug.cgi?id=456175
>
> Please Cc me in a reply.

applied to tip/x86/urgent, thanks Jan! The commit below is also for
-stable.

Ingo

----------------->
commit d536b1f86591fb081c7a56eab04e711eb4dab951
Author: Jan Kratochvil <[email protected]>
Date: Tue Jul 22 14:00:47 2008 +0200

x86: fix crash due to missing debugctlmsr on AMD K6-3

currently if you use PTRACE_SINGLEBLOCK on AMD K6-3 (i586) it will crash.
Kernel now wrongly assumes existing DEBUGCTLMSR MSR register there.

Removed the assumption also for some other non-K6 CPUs but I am not sure there
(but it can only bring small inefficiency there if my assumption is wrong).

Based on info from Roland McGrath, Chuck Ebbert and Mikulas Patocka.
More info at:
https://bugzilla.redhat.com/show_bug.cgi?id=456175

Signed-off-by: Jan Kratochvil <[email protected]>
Cc: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
---
arch/x86/Kconfig.cpu | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu
index 54b8c02..2c518fb 100644
--- a/arch/x86/Kconfig.cpu
+++ b/arch/x86/Kconfig.cpu
@@ -414,4 +414,4 @@ config X86_MINIMUM_CPU_FAMILY

config X86_DEBUGCTLMSR
def_bool y
- depends on !(M586MMX || M586TSC || M586 || M486 || M386)
+ depends on !(MK6 || MWINCHIPC6 || MWINCHIP2 || MWINCHIP3D || MCYRIXIII || M586MMX || M586TSC || M586 || M486 || M386)