libsystrap
libsystrap copied to clipboard
Distinct but file-aliased W and X mappings are not caught
We need to avoid distinct simultaneous W and X mappings of the same underlying object, such as a file that is MAP_SHARED. That would have the same effect as a writable-and-executable mapping. Such a check is easy in principle, but requires tracking
the inode and device number behind every existing file mapping. (File descriptors are OK because we can fstat()
them on demand.)
Attempts to remap the same object should probably return -ETXTBSY. Or we could perhaps emulate support we need to (see #6).