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



Alright, so I think we have established that it's impossible to
provide KERN_PROC_SIGTRAMP as it functions on FreeBSD and DragonFly.
The purpose of that sysctl is to get the address range of the single
signal trampoline.
Would it be possible to have a slightly different version on NetBSD
that accomplishes the same thing?
For example, call it KERN_PROC_SIGTRAMPS.  The first time it's called
with a null oldp argument to get the result size, and the second time
it's called with a properly sized buffer that is returned filled with
address ranges like an array, one range for each defined signal tramp.

It would be up to the program to iterate through the ranges to
determine if a stack pointer is within a signal tramp range.
And the gcc unwinder could be designed to only have to call it those 2
times since the result is static per process.

John


Home | Main Index | Thread Index | Old Index