From: valdis.kletnieks@vt.edu (valdis.kletnieks at vt.edu) Date: Fri, 10 Nov 2017 14:04:41 -0500 Subject: Why replacing running executable file is forbidden, but overwriting of memory mapped shared object is allowed ? In-Reply-To: <489841510337062@web43g.yandex.ru> References: <1337441510320617@web44g.yandex.ru> <16969.1510331047@turing-police.cc.vt.edu> <489841510337062@web43g.yandex.ru> Message-ID: <31575.1510340681@turing-police.cc.vt.edu> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org 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