Conversation

This Tweet was deleted by the Tweet author. Learn more
It's also unfortunate that it requires an extra system call. Bionic removed a bunch of the labels due to the cost added to thread spawning. They're almost always set on the whole memory region after an mmap or mprotect call. Requiring extra system calls deters using the feature.
1
This Tweet was deleted by the Tweet author. Learn more
It would help a bit to be able to set more than one at a time but it would still be worse than being able to set them with mmap / mprotect. So, for example, hardened_malloc uses mappings directly for sizes above either 128k (default) or 16k (extended size classes disabled).
1
This Tweet was deleted by the Tweet author. Learn more
In general, it would be nice if there was a way to run arbitrary chains of system calls in batches to avoid the entry/exit cost. For these ones in particular, they could in theory only grab / release mmap_sem once, but it could increase latency if you batched too much together.
2
1
Show more replies