On Wed, Jun 25, 2025 at 12:52:41AM +0200, Samuel Thibault wrote: > > Yes, and that's what we want: like on Linux. RLIMIT_AS is supposed to > limit mmap(PROT_NONE) as well. >
Ok, then the assumption of my test is completely wrong :) I'll remove it. But then I don't think I understand your suggestion: > It would be also useful to check that trying to vm_protect the PROT_NONE > into PROT_ALL fails when that comes above the limit. Why would vm_protect fail when upgrading a mmap(PROT_NONE) if the allocated memory is already accounted on the size of the vm_map? Diego