Conversation

Replying to
mremap is super broken because it returns EINVAL if you try to use it on multiple VMAs but the kernel does not reliably merge compatible VMAs. I have a simple test case involving switching to PROT_NONE and back where it fails to merge them, and then mremap will return EINVAL...
1
1
Replying to and
IIRC, the issue is that the expanded usable area between the guards doesn't get reliably merged into a single VMA. That ends up breaking the MREMAP_MAYMOVE case below since it gets EINVAL when it tries to remap the usable area. It's such a nonsense API. Really hate it.
1
Show replies