tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Request for implementation of KERN_PROC_SIGTRAMP sysctl



uwe,
I don't know much about CFI attributes.  I had just assumed that
strip(1) would remove those symbols.  Was that a bad assumption?  I'm
still not sure if GCC unwind can use them but if they are permanent
and I took a look at gccgo, maybe it could work.
John

On Mon, Oct 18, 2021 at 12:41 PM Valery Ushakov <uwe%stderr.spb.ru@localhost> wrote:
>
> On Mon, Oct 18, 2021 at 10:41:48 -0500, John Marino (NetBSD) wrote:
>
> > How we did it with libc before is shown in the netbsd-unwind.h link in
> > the original post.  This technique looks for __sigtramp_siginfo_2
> > assembly code but no longer works.  I don't know how to do this any
> > other way.  GDB doesn't either, it uses the debug information to match
> > the function name __sigtramp_siginfo_2 and I am not even sure that's
> > valid for current NetBSD releases based on what we've learned here.
>
> Didn't kamil@ fixed this a while back?  E.g. for amd64:
>
> revision 1.8
> date: 2020-10-12 20:55:54 +0300;  author: kamil;  state: Exp;  lines: +29 -3;  commitid: sz57gQtWi3mGKDrC;
> Decorate the x86_64 signal trampoline with CFI attributes easing unwinding
>
> Combine the approach provided by Nikhil Benesch and Andrew Cagney.
>
> Now, the unwinders (in gccgo, backtrace(3), etc) can unwind properly
> the stack from a signal handler.
>
> Fixes lib/55719 by Nikhil Benesch
>
> -uwe


Home | Main Index | Thread Index | Old Index