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



On Fri, Oct 15, 2021 at 14:44:16 -0500, John Marino (NetBSD) wrote:

> Is it possible for NetBSD to implement KERN_PROC_SIGTRAMP sysctl?
> 
> TLDR;
> For several years, the GNAT Ada compiler has not been able to unwind a
> stack containing a signal trampoline.  The unwinder I wrote for gcc
> several years ago just stopped working on newer NetBSD release even
> though the signal trampoline code itself did not change.  FreeBSD and
> DragonFly BSD are immune to sigtramp location changes because they've
> introduced the KERN_PROC_SIGTRAMP sysctl which provides the location
> of the signal tramp of the process.

It's been ages since I touched this area, but don't we have
per-sigaction trampolines?  I mean, in practice they all use the same
__sigtramp_siginfo_$version trampoline, that sigaction passes to the
actual syscall, but in principle the process can have different
trampolines for different signals, can't it?

struct sys___sigaction_sigtramp_args {
	syscallarg(int) signum;
	syscallarg(const struct sigaction *) nsa;
	syscallarg(struct sigaction *) osa;
	syscallarg(const void *) tramp; // <-
	syscallarg(int) vers;
};


-uwe


Home | Main Index | Thread Index | Old Index