]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Use the previous stack entry protection and max protection to correctly
authorKonstantin Belousov <kib@FreeBSD.org>
Sun, 10 Jun 2012 11:31:50 +0000 (11:31 +0000)
committerKonstantin Belousov <kib@FreeBSD.org>
Sun, 10 Jun 2012 11:31:50 +0000 (11:31 +0000)
commit83ce08538a49519330ef4e6ddab3f5dee646e861
tree63c8c418766e713c7be2de40301bae196e0a4350
parenteb586bd9ee79efb37759109fadbc49fed2cddaa7
Use the previous stack entry protection and max protection to correctly
propagate the stack execution permissions when stack is grown down.

First, curproc->p_sysent->sv_stackprot specifies maximum allowed stack
protection for current ABI, so the new stack entry was typically marked
executable always. Second, for non-main stack MAP_STACK mapping,
the PROT_ flags should be used which were specified at the mmap(2) call
time, and not sv_stackprot.

MFC after: 1 week
sys/vm/vm_map.c