* Roland McGrath rol...@redhat.com [2010-07-12 22:59:05]:
When I had posted a prototype of a gdbstub which Frank and I had
worked on. http://lkml.org/lkml/2009/11/30/173, Peter and Ingo
showed a preference for a combined gdbstub in kernel, i.e kgdb and the
newer stub should use only one
Hi Oleg,
Hello.
Please see the attachment. Don't take this code seriously, this is
the early prototype and everything should be rewritten. It barely
uses utrace, only to stop the target.
(gdb) file /path/to/binary
(gdb) target extended-remote /proc/ugdb
(gdb) attach
Hello.
Please see the attachment. Don't take this code seriously, this is
the early prototype and everything should be rewritten. It barely
uses utrace, only to stop the target.
(gdb) file /path/to/binary
(gdb) target extended-remote /proc/ugdb
(gdb) attach PID
Hi Roland, Oleg,
Would it be a good idea to probably start looking at user space api for
utrace? By doing that we would get usecases that maintainers in LKML are
looking for and start looking at its usefulness.
Currently its probably a egg and chicken case where they look at what
end customers
Here is a summary of the Comments and actions that need to be taken for
the current uprobes patchset. Please let me know if I missed or
misunderstood any of your comments.
1. Uprobes depends on trap signal.
Uprobes depends on trap signal rather than hooking to the global
die notifier.
* Frederic Weisbecker fweis...@gmail.com [2010-01-19 19:06:12]:
On Tue, Jan 19, 2010 at 09:47:45AM -0800, Jim Keniston wrote:
What does the code in the jumped-to vma do? Is the instrumentation code
that corresponds to the uprobe handlers encoded in an ad hoc .so?
Once the
* Avi Kivity a...@redhat.com [2010-01-18 14:17:10]:
On 01/18/2010 02:13 PM, Pekka Enberg wrote:
So how big chunks of the address space are we talking here for uprobes?
That's for the authors to answer, but at a guess, 32 bytes per probe
(largest x86 instruction is 15 bytes), so 32 MB will
Hi Peter,
My reply in
http://lkml.indiana.edu/hypermail/linux/kernel/1001.1/02483.html
addresses this.
Right, so all that need be done is add the multiple probe stuff to UBP
and its a sane interface to use on its own, at which point I'd be
inclined to call that uprobes (UBP
* Peter Zijlstra pet...@infradead.org [2010-01-15 10:07:35]:
On Thu, 2010-01-14 at 14:43 -0800, Jim Keniston wrote:
Yeah, there's not a lot of context there. I hope it will make more
sense if you read section 1.1 of Documentation/uprobes.txt (patch #6).
Or look at get_insn_slot() in
* Peter Zijlstra pet...@infradead.org [2010-01-15 11:33:27]:
Uprobes layer would need to be notified of process life-time events
like fork/clone/exec/exit.
No so much the process lifetimes as the vma life times are interesting,
placing a hook in the vm code to track that isn't too
x86 support for user breakpoint Infrastructure
This patch provides x86 specific userspace breakpoint assistance
implementation details.
This patch requires x86: instruction decoder API patch.
http://lkml.org/lkml/2009/6/1/459
Signed-off-by: Jim Keniston jkeni...@us.ibm.com
Signed-off-by: Srikar
current vma.
3. If we cant expand the vma, allocate a new vma.
Signed-off-by: Jim Keniston jkeni...@us.ibm.com
Signed-off-by: Srikar Dronamraju sri...@linux.vnet.ibm.com
---
arch/Kconfig|4
include/linux/ubp_xol.h | 56
kernel/Makefile |1
kernel/ubp_xol.c
contributions to Uprobes:
+Jim Keniston - jkeni...@us.ibm.com
+Srikar Dronamraju - sri...@linux.vnet.ibm.com
+Ananth Mavinakayanahalli - ana...@in.ibm.com
+Prasanna Panchamukhi - prasa...@in.ibm.com
+Dave Wilder - dwil...@us.ibm.com
+
+11. Uprobes Example
+
+Here's a sample kernel module showing
* Peter Zijlstra pet...@infradead.org [2009-11-30 13:09:12]:
On Mon, 2009-11-30 at 17:33 +0530, Srikar Dronamraju wrote:
This patch implements an in-kernel gdb stub.
It provides an interface between gdb and Linux Kernel by implementing
the remote serial protocol. This gdbstub uses utrace
* Peter Zijlstra pet...@infradead.org [2009-11-30 13:41:47]:
This is a In-kernel gdbstub to debug user space programs.
This stub doesnt help in debugging kernel.
Hence I am not sure how to compare kgdb gdbstub with this gdbstub.
Can you please provide more pointers on what you were
I guess Christoph, Roland and Frank would be able to explain in a better
fashion the rational and advantages of this stub over convential gdb.
Hmm,. wouldn't it make much more sense to extend the current kgdb stub
to include userspace debugging, providing an all-in-one solution?
I see
Hi Christoph,
The other thing is that this patchset really doesn't quite justify
utrace. It's growing a lot more code without actually growing any
useful functionality. What about all those other utrace killer
features that have been promised for a long time?
We are working on
Hi Oleg, Roland, Ananth
When I get the latest set of ptrace-tests by using.
cvs -d :pserver:anoncvs:anon...@sources.redhat.com:/cvs/systemtap co
ptrace-tests
I get errors when I run make
syscall-from-clone.c: In function âmainâ:
syscall-from-clone.c:127: error: storage size of
+#ifdef ARCH_HAS_USER_SINGLE_STEP_INFO
+extern void user_single_step_siginfo(struct task_struct *tsk,
+ struct pt_regs *regs, siginfo_t *info);
+#else
+static inline void user_single_step_siginfo(struct task_struct *tsk,
+ struct
* Oleg Nesterov o...@redhat.com [2009-10-26 04:28:46]:
@@ -169,9 +164,9 @@ static inline void ptrace_init_task(stru
INIT_LIST_HEAD(child-ptraced);
child-parent = child-real_parent;
child-ptrace = 0;
- if (unlikely(ptrace)) {
+ if (unlikely(ptrace) (current-ptrace
Hi Frank, Jim, Mark,
This fix is equivalent to commit
a82ac1f413712a375d5e14ef7641ce0abf7a6543 in systemtap tree.
--
We allocate a fake unlinked shmem file because anonymous
memory might not be granted execute permission when the
selinux security hooks have their way.
Signed-off-by: Srikar
This patchset just does code cleanup and no additional bugfixes
or features.
After applying this patchset, checkpatch reports:
total: 0 errors, 0 warnings, 0 checks, 1560 lines checked
Subject: [PATCH 0/2] Code cleanup patches.
File: /tmp/gdbstub-patches/4/intro
Subject: [PATCH 1/2] Make gdbstub
Remove duplicate code where possible by using reusable functions.
Signed-off-by: Srikar Dronamraju sri...@linux.vnet.ibm.com
---
kernel/utrace-gdb.c | 272 +++
1 files changed, 123 insertions(+), 149 deletions(-)
diff --git a/kernel/utrace-gdb.c
() and find_gdb_connection
helper functions.
5. No need to lock gdb_connections_mutex when unregistering uprobes.
Signed-off-by: Srikar Dronamraju sri...@linux.vnet.ibm.com
---
kernel/utrace-gdb.c | 334 +++
1 files changed, 202 insertions(+), 132
keep the
uprobes engine active till the thread dies.
Jim Keniston's observation on uprobes lifetime made me figure out an
error in defer_registration patch that I sent earlier.
Signed-off-by: Srikar Dronamraju sri...@linux.vnet.ibm.com
---
kernel/uprobes_core.c |8 ++--
1 files changed, 2
Hi Roland, Oleg
I hit upon a case where a traced thread steps over a inserted breakpoint
instruction, and the tracing engine requests the traced thread to be
interrupted. Here the traced thread calls report_signal callback with
UTRACE_REPORT_SIGNAL and later does a report_signal callback with
/uc_make_defer_un_register_uprobe.patch
Subject: [PATCH 2/2] Allow deferred register/unregister of uprobes.
File: /tmp/gdbstub-patches/2/gs_use_deferred_register_uprobe.patch
--
Thanks and Regards
Srikar Dronamraju
commit 20744cb97a3e4aec63ba7b92ce4115170fd468d6
Author: Srikar Dronamraju sri...@linux.vnet.ibm.com
Date: Wed Aug 19 12:26:15 2009 +0530
Use deferred registration facility for register_uprobe
Signed-off-by: Srikar Dronamraju sri...@linux.vnet.ibm.com
---
kernel/utrace-gdb.c | 75
one of my previous changes to gdbstub.
Signed-off-by: Srikar Dronamraju sri...@linux.vnet.ibm.com
---
kernel/ubp_xol.c |1 +
kernel/uprobes_core.c |1 +
kernel/utrace-gdb.c |1 +
3 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/kernel/ubp_xol.c b/kernel
Hi Oleg,
--- PU/kernel/ptrace.c~09_MV_PTRACE_CK2009-08-19 16:49:25.0
+0200
+++ PU/kernel/ptrace.c2009-08-20 20:04:59.0 +0200
@@ -471,35 +471,47 @@ static int ptrace_attach_task(struct tas
{
struct utrace_engine *engine;
unsigned long events;
Hi Oleg,
Thanks for the clarification.
Please note the comment, this check relies on UTRACE_ATTACH_EXCLUSIVE
above. Once we see -ptrace = 0 after utrace_attach_task(), nobody
can change -ptrace.
However after attaching an engine exclusively, (which would mean the
child is not traced or was
: /tmp/gdbstub-patches/1/only_stop_once.patch
--
Thanks and Regards
Srikar Dronamraju
commit 90cc0931707c99459aea0f6601d7f5ce2756dbd8
Author: Srikar Dronamraju sri...@linux.vnet.ibm.com
Date: Wed Aug 19 10:26:00 2009 +0530
While releasing, unregister uprobes if any after detach
Currently because of the way uprobes works, (register/unregister may
deadlock if one of the threads
commit bd86cff51a2f221b6cb10649212e5392aea7bcb7
Author: Srikar Dronamraju sri...@linux.vnet.ibm.com
Date: Wed Aug 19 11:43:53 2009 +0530
We only need to intimate gdb once if we get multiple requests for look
There can be multiple stop requests before gdb gets control. However continue
from gdb
Could you show the code please? I don't really understand how it
looks with 1+2 above.
I am attaching the code.
The module code is in try_utrace/probe5_a.c and try_utrace/probe5_b.c.
But, just in case... I think module_b should re-assert SINGLESTEP
from either
Aaahhh. Srikar, I spent 3 hours trying to understand
Your code does NOT reassert SINGLESTEP. Of course, -report_signal
is not called again, utrace_get_signal() just clears -report when
it is called after wakeup.
Because you forgot to add QUIESCE to utrace_set_events's mask !!!
Hi Roland,
If we have two utrace engines for a thread with first engine requesting
UTRACE_STOP and second one requesting UTRACE_SINGLESTEP, utrace
correctly gives priority to UTRACE_STOP.
However when the first engine detaches(or resumes) the singlestep
request from the second engine is not
* Jim Keniston jkeni...@us.ibm.com [2009-08-03 11:10:00]:
So as per my analysis, gdb_utrace_report_signal was called, followed by
uprobe_report_signal. Since gdb_utrace_report_signal requested for
UTRACE_STOP as resume action for SIGTRAP, the thread got stopped.
uprobes was waiting
The target process side is also hung:
zsh D 0002 3568 1288 1259 0x0080
880078c57b98 0046 00011d4a
88006d4b8000 880078c57f50 7fff138b0858
88006d4b83b8 f968
Hi Roland, et al,
Did you get a chance to review this patchset?
I was planning to post to LKML after addressing comments from you.
--
Thanks and Regards
Srikar
Hi,
This patchset implements uprobes over utrace.
Please review the patchset and provide your valuable comments.
These patches
Hi Frank, Roland
Using UTRACE_STOP as action in report_signal and report_quiesce results
in utrace_stop() being called which causes the thread to be scheduled
out. This results in gdb not getting control/data from the remote and
results in gdb command prompt.
From looking at kgdb-stub, I feel it
Signed-off-by: Srikar Dronamraju sri...@linux.vnet.ibm.com
---
arch/Kconfig| 12 +
include/linux/ubp.h | 282 ++
kernel/Makefile |1
kernel/ubp_core.c | 479
4 files changed, 774 insertions(+)
Index
x86 support for user breakpoint Infrastructure
This patch provides x86 specific userspace breakpoint assistance
implementation details.
This patch requires x86: instruction decoder API patch.
http://lkml.org/lkml/2009/6/1/459
Signed-off-by: Jim Keniston jkeni...@us.ibm.com
---
x86 support for Uprobes
Signed-off-by: Jim Keniston jkeni...@us.ibm.com
---
arch/x86/Kconfig |1 +
arch/x86/include/asm/uprobes.h | 27 +++
2 files changed, 28 insertions(+)
Index: uprobes.git/arch/x86/Kconfig
contributions to Uprobes:
+Jim Keniston - jkeni...@us.ibm.com
+Srikar Dronamraju - sri...@linux.vnet.ibm.com
+Ananth Mavinakayanahalli - ana...@in.ibm.com
+Prasanna Panchamukhi - prasa...@in.ibm.com
+Dave Wilder - dwil...@us.ibm.com
+
+11. Uprobes Example
+
+Here's a sample kernel module showing the use
ringbuffer
- Allow user to specify Nick Name for probe addresses.
- Dump arguments from floating point registers.
- Optimize code to use single probe instead of multiple probes for same probe
addresses.
--
Signed-off-by: Mahesh Salgaonkar mah...@linux.vnet.ibm.com
Signed-off-by: Srikar Dronamraju
* Roland McGrath rol...@redhat.com [2008-10-17 13:09:34]:
What are your thoughts of getting utrace git tree into linux-next?
That way, utrace will have more extensive visibility and testing.
I would certainly like to. I hope that after I next post the latest utrace
patch series for more
Hi Chris,
Thanks for your quick reply.
I have been regularly updating from cvs. So I thought I was always on
the latest copy. To confirm I checked out a new copy using
cvs -z9 -d :ext:[EMAIL PROTECTED]:/cvs/systemtap co froggy
and compared it the copy I update regularly and they seem to be
48 matches
Mail list logo