diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-02-26 03:40:27 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-02-29 12:55:42 -0500 |
commit | b4ef95de00be4c2c30feccf607a45093c8c118b7 (patch) | |
tree | b8b608a63d6fde06bec0dc99aa4a6ca7d13c3230 /arch/x86/kernel/ptrace.c | |
parent | 8be8f54bae3453588011cad06363813a5293af53 (diff) |
x86: disable BTS ptrace extensions for now
revert the BTS ptrace extension for now.
based on general objections from Roland McGrath:
http://lkml.org/lkml/2008/2/21/323
we'll let the BTS functionality cook some more and re-enable
it in v2.6.26. We'll leave the dead code around to help the
development of this code.
(X86_BTS is not defined at the moment)
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/ptrace.c')
-rw-r--r-- | arch/x86/kernel/ptrace.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c index d862e396b099..f41fdc98efb1 100644 --- a/arch/x86/kernel/ptrace.c +++ b/arch/x86/kernel/ptrace.c | |||
@@ -544,6 +544,8 @@ static int ptrace_set_debugreg(struct task_struct *child, | |||
544 | return 0; | 544 | return 0; |
545 | } | 545 | } |
546 | 546 | ||
547 | #ifdef X86_BTS | ||
548 | |||
547 | static int ptrace_bts_get_size(struct task_struct *child) | 549 | static int ptrace_bts_get_size(struct task_struct *child) |
548 | { | 550 | { |
549 | if (!child->thread.ds_area_msr) | 551 | if (!child->thread.ds_area_msr) |
@@ -826,6 +828,7 @@ void ptrace_bts_take_timestamp(struct task_struct *tsk, | |||
826 | 828 | ||
827 | ptrace_bts_write_record(tsk, &rec); | 829 | ptrace_bts_write_record(tsk, &rec); |
828 | } | 830 | } |
831 | #endif /* X86_BTS */ | ||
829 | 832 | ||
830 | /* | 833 | /* |
831 | * Called by kernel/ptrace.c when detaching.. | 834 | * Called by kernel/ptrace.c when detaching.. |
@@ -839,7 +842,9 @@ void ptrace_disable(struct task_struct *child) | |||
839 | clear_tsk_thread_flag(child, TIF_SYSCALL_EMU); | 842 | clear_tsk_thread_flag(child, TIF_SYSCALL_EMU); |
840 | #endif | 843 | #endif |
841 | if (child->thread.ds_area_msr) { | 844 | if (child->thread.ds_area_msr) { |
845 | #ifdef X86_BTS | ||
842 | ptrace_bts_realloc(child, 0, 0); | 846 | ptrace_bts_realloc(child, 0, 0); |
847 | #endif | ||
843 | child->thread.debugctlmsr &= ~ds_debugctl_mask(); | 848 | child->thread.debugctlmsr &= ~ds_debugctl_mask(); |
844 | if (!child->thread.debugctlmsr) | 849 | if (!child->thread.debugctlmsr) |
845 | clear_tsk_thread_flag(child, TIF_DEBUGCTLMSR); | 850 | clear_tsk_thread_flag(child, TIF_DEBUGCTLMSR); |
@@ -961,6 +966,10 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
961 | break; | 966 | break; |
962 | #endif | 967 | #endif |
963 | 968 | ||
969 | /* | ||
970 | * These bits need more cooking - not enabled yet: | ||
971 | */ | ||
972 | #ifdef X86_BTS | ||
964 | case PTRACE_BTS_CONFIG: | 973 | case PTRACE_BTS_CONFIG: |
965 | ret = ptrace_bts_config | 974 | ret = ptrace_bts_config |
966 | (child, data, (struct ptrace_bts_config __user *)addr); | 975 | (child, data, (struct ptrace_bts_config __user *)addr); |
@@ -988,6 +997,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
988 | ret = ptrace_bts_drain | 997 | ret = ptrace_bts_drain |
989 | (child, data, (struct bts_struct __user *) addr); | 998 | (child, data, (struct bts_struct __user *) addr); |
990 | break; | 999 | break; |
1000 | #endif | ||
991 | 1001 | ||
992 | default: | 1002 | default: |
993 | ret = ptrace_request(child, request, addr, data); | 1003 | ret = ptrace_request(child, request, addr, data); |
@@ -1226,12 +1236,14 @@ asmlinkage long sys32_ptrace(long request, u32 pid, u32 addr, u32 data) | |||
1226 | case PTRACE_SETOPTIONS: | 1236 | case PTRACE_SETOPTIONS: |
1227 | case PTRACE_SET_THREAD_AREA: | 1237 | case PTRACE_SET_THREAD_AREA: |
1228 | case PTRACE_GET_THREAD_AREA: | 1238 | case PTRACE_GET_THREAD_AREA: |
1239 | #ifdef X86_BTS | ||
1229 | case PTRACE_BTS_CONFIG: | 1240 | case PTRACE_BTS_CONFIG: |
1230 | case PTRACE_BTS_STATUS: | 1241 | case PTRACE_BTS_STATUS: |
1231 | case PTRACE_BTS_SIZE: | 1242 | case PTRACE_BTS_SIZE: |
1232 | case PTRACE_BTS_GET: | 1243 | case PTRACE_BTS_GET: |
1233 | case PTRACE_BTS_CLEAR: | 1244 | case PTRACE_BTS_CLEAR: |
1234 | case PTRACE_BTS_DRAIN: | 1245 | case PTRACE_BTS_DRAIN: |
1246 | #endif | ||
1235 | return sys_ptrace(request, pid, addr, data); | 1247 | return sys_ptrace(request, pid, addr, data); |
1236 | 1248 | ||
1237 | default: | 1249 | default: |