[MLton] Re: Hppa

Wesley W. Terpstra terpstra@gkec.tu-darmstadt.de
Fri, 17 Dec 2004 21:41:49 +0100

On Fri, Dec 17, 2004 at 02:02:26PM -0600, Henry Cejtin wrote:
> The MLton stuff uses sigaltstack() (a system call) which should set things
> up so that an alternate stack is used on all signals.  This is meant exactly
> for processes that are doing funny things with the stack register.
> Looking via google (for sigaltstack() and HPPA) I see items about kernel
> patches as recently as May of this year to fix it.

The alternate stack which MLton sets up is also not PROT_EXEC.
Therefore, whether an alternate stack is used or not is irrelevant.
So, those patches to the kernel aren't going to fix things for us.

Prior to sigaltstack(), ssmmap->smmap->GC_mmapAnon->mmapAnon->mmap is called.
Does 'ssmmap' mean signal stack mmap?

If so, in platform/ssmmap.c it might make sense to add another mprotect line
which adds the PROT_EXEC for the middle. What do you think? I will try this.
At least this way everything else is not executable.

Wesley W. Terpstra