Re: [patch 1/2] x86, ptrace: support pebs in ds.c

From: Ingo Molnar
Date: Tue Feb 26 2008 - 03:53:09 EST



* Roland McGrath <roland@xxxxxxxxxx> wrote:

> Sorry I haven't replied in this thread sooner.
>
> I would like to see all the BTS and DS work wait until after 2.6.25.
> We have a lot of x86 churn in 2.6.25 already, and I think we'd do
> better without adding this wrinkle at the same time.
>
> The low-level implementation pieces should gel a bit more in -mm or
> whereever. They should both get more testing and also get more
> concrete use from the perfmon2 integration effort to iron out their
> internal interface kinks.
>
> For the user-level interface, we should not be hasty with cooking up
> hairy ptrace extensions. Personally, I'd prefer that we never add a
> ptrace-based interface for this (ptrace must die). I think it will
> fit much better either merged into the interfaces that come from
> perfmon2 integration, or into what replaces ptrace when that comes.
> There is not yet any different userland interface framework in the
> tree to base it on, so ptrace extensions may be better than nothing if
> they are well-gelled in 2.6.26 and nothing else is close to ready. But
> I also don't know of anyone desperate and about to burst from lack of
> BTS functionality.

i'd you'd like to have something like the patch below to happen?

what API should BTS/DS functionality use towards user-space if not
ptrace? Should it be utrace?

Ingo

--------------------->
Subject: x86: disable BTS ptrace extensions for now
From: Ingo Molnar <mingo@xxxxxxx>
Date: Tue Feb 26 09:40:27 CET 2008

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 enable
it in v2.6.26.

(X86_BTS is not defined at the moment)

Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
---
arch/x86/kernel/ptrace.c | 5 +++++
1 file changed, 5 insertions(+)

Index: linux-x86.q/arch/x86/kernel/ptrace.c
===================================================================
--- linux-x86.q.orig/arch/x86/kernel/ptrace.c
+++ linux-x86.q/arch/x86/kernel/ptrace.c
@@ -961,6 +961,10 @@ long arch_ptrace(struct task_struct *chi
break;
#endif

+ /*
+ * These bits need more cooking - not enabled yet:
+ */
+#ifdef X86_BTS
case PTRACE_BTS_CONFIG:
ret = ptrace_bts_config
(child, data, (struct ptrace_bts_config __user *)addr);
@@ -988,6 +992,7 @@ long arch_ptrace(struct task_struct *chi
ret = ptrace_bts_drain
(child, data, (struct bts_struct __user *) addr);
break;
+#endif

default:
ret = ptrace_request(child, request, addr, data);
--
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/