Executables don't control their address space entirely, every library reserves some pages.
Could the extra address space be reserved once by a library everyone links to, the libc? Utrace would write the displaced instructions into that shared space, which the process has no control over. No VMA is introduced while the process is running.
Though that requires some coordination. It's more convenient to let the kernel do the reservation. But it can be done very early to not interfere with the process and its libraries.
Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds