Re: why do we put code onto the stack when doing a signal?

H. Peter Anvin (
Mon, 14 Apr 1997 10:50:03 -0700 (PDT)

> this looks like the only code that is put onto the stack. This is a static
> sequence of instructions, why cant we put this into a shared read-only,
> executable mmap()-ed area? [say into libc].

The kernel can't rely on libc (with the possible exception of if we
have a system call by which libc could point to a pre-defined code
sequence), although the kernel certainly could reserve a page or so of
address-space that would be mapped into all processes.