This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: User Stack Trace
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: grundym at us dot ibm dot com (grundy)
- Cc: systemtap at sources dot redhat dot com
- Date: 17 Apr 2007 15:39:58 -0400
- Subject: Re: User Stack Trace
- References: <20070416205152.GB7653@us.ibm.com>
grundym@us.ibm.com (grundy) writes:
> [...]
> struct frame_head {
> struct frame_head * ebp;
> unsigned long ret;
> } __attribute__((packed)) stack_frame[2], *head;
> [...]
> head = (struct frame_head *)nregs->ebp;
> if (user_mode_vm(nregs)) {
> [...]
> _stp_copy_from_user ((char *)stack_frame,
> (const char __user *) head->ebp,
> sizeof(stack_frame));
> head = stack_frame;
> [...]
To what extent does this work for user code compiled without frame
pointers? Or containing corrupt/malicious stack data?
- FChE