Index | Thread | Search

From:
Alexandr Nedvedicky <sashan@fastmail.net>
Subject:
Re: stacktrace_save_utrace() should be more robust
To:
Ted Unangst <tedu@tedunangst.com>, Mark Kettenis <mark.kettenis@xs4all.nl>, tech@openbsd.org
Date:
Thu, 22 May 2025 09:00:53 +0200

Download raw body.

Thread
On Thu, May 22, 2025 at 07:17:07AM +0200, Claudio Jeker 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 assume you mean 'struct intrframe' because this is currently
    running on behalf of clock interrupt it is profiling probe.

thanks and
regards
sashan