libsystrap icon indicating copy to clipboard operation
libsystrap copied to clipboard

Distinct but file-aliased W and X mappings are not caught

Open stephenrkell opened this issue 3 years ago • 0 comments

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).

stephenrkell avatar Mar 16 '21 14:03 stephenrkell