Subject: uvm_mmap.c 1.47
To: None <thorpej@netbsd.org>
From: Charles M. Hannum <root@ihack.net>
List: tech-kern
Date: 01/07/2001 07:06:22
> Only include PROT_EXEC in maxprot if the user specified PROT_EXEC
> in the mmap() call. maxprot is used to create device mappings,
> and always including PROT_EXEC causes the mapping to fail on the Alpha
> when mapping a non-RAM offset of /dev/mem (which may be sparse, so
> instruction fetch from there is disallowed).
I believe this change is VERY, VERY WRONG, as it specifically breaks
valid usage of mprotect(2). I wouldn't be at all surprised to find
out that it actually breaks some software that does dynamic code
compilation.
It should be undone ASAP. If you need to do something like this, do
it in udv_fault() instead.