Anton Lindqvist <an...@cvs.openbsd.org> wrote:

> CVSROOT:      /cvs
> Module name:  src
> Changes by:   an...@cvs.openbsd.org   2022/10/10 23:45:41
> 
> Modified files:
>       regress/sys/kern/noexec: Makefile noexec.c 
> 
> Log message:
> Run noexec tests in a new thread, leveraging the fact that
> pthread_create() allocates a new stack which has mutable permissions.
> Allows the temporary expected failures to be dropped.
> 
> ok deraadt@

The purpose of some of these regress tests is not to check if you
can mmap or mprotect on top of the stack (or "a stack").

Rather it is testing how the stacks behave, whether the pmap and mmu/tlb
have honoured the requested behaviour....

That's why we still want these tests to work.  But obviously they won't
work on the main stack, if we succeed at making the region immutable.

That's why a pthread stack is more suitable for testing this.

of course, an i386 with W^X as line-in-the-sand segmentation support
doesn't exactly do this right for pthread stacks.... *shrug*

Reply via email to