Subject: signal trampoline implementation choices
To: None <>
From: Emmanuel Dreyfus <>
List: tech-kern
Date: 04/16/2002 21:45:41
On NetBSD, the signal trampoline is copied by the kernel on the stack. I
recently discovered that IRIX uses a signal trampoline that is provided
by libc. The sigaction libc stub gives the signal trampoline address to
the sigaction system call, through a fourth argument.

Which are the motivation toward thoses different implementations? I
found this
for trampoline in libc: 
- the stack does not need to be executable

for trampoline in the kernel, copied on the stack:
- the kernel hands the signal trampoline, hence if the signal ABI
changed, the kernel contains the new version and libc does not have to
check kernel version for signal handling
- hacks in libc stubs looks bad

Anyone see another reason? It's just that I'd like to understand why
they done it that way.
Emmanuel Dreyfus
UNIX *is* user friendly. It is just a bit selective about his friends