Why replacing running executable file is forbidden, but overwriting of memory mapped shared object is allowed ?

valdis.kletnieks at vt.edu valdis.kletnieks at vt.edu
Fri Nov 10 14:04:41 EST 2017


On Fri, 10 Nov 2017 21:04:22 +0300, Lev Olshvang said:

> I am going to patch inode reference count of  mapped shared libs 

Congrats. You just corrupted your file system.

Hint 1:  What happens if you decrement the count by one unnecessarily,
and later on, probably during system shutdown, the reference count drops
to zero instead of one?

Hint 2:  What happens if you incremented the count, and at system shutdown,
there's still a reference left when the kernel tries to unmount and sync the
filesystem?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 486 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20171110/a7855194/attachment.bin 


More information about the Kernelnewbies mailing list