Index | Thread | Search

From:
Philip Guenther <guenther@gmail.com>
Subject:
Re: stacktrace_save_utrace() should be more robust
To:
Alexandr Nedvedicky <sashan@fastmail.net>, Ted Unangst <tedu@tedunangst.com>, Mark Kettenis <mark.kettenis@xs4all.nl>, tech@openbsd.org
Date:
Thu, 22 May 2025 16:19:54 -0700

Download raw body.

Thread
On Wed, May 21, 2025 at 10:19 PM Claudio Jeker <cjeker@diehard.n-r-g.com> wrote:
> On Thu, May 22, 2025 at 05:09:17AM +0200, Alexandr Nedvedicky wrote:
> > Hello,
> >
> > On Wed, May 21, 2025 at 08:15:48PM -0400, Ted Unangst wrote:
> > </snip>
> > >
> > > Is it possible to use two loops here? One loop to get out of the kernel,
> > > and then the second that does the copyin? I think there is not so much
> > > code in common that duplicating is a problem, and it will be more clear
> > > what we're trying to do in each loop.
> > >
> >
> >     I like this idea. it makes code lot more clear.
> >     updated diff follows.
>
> I never looked into this proper but instead of walking the full kernel
> stack, can't we start with the information in the trapframe?
> Don't remember if there is a pointer to it somewhere in the pcb.

I think it varies arch to arch, but on amd64 you're looking for
proc->p_md.md_regs.


Philip