Hello dear list members!
I have I hook in linux security ops on bprm_check_security()
and I print the i_count of inode inside my hook
I started several instances of cat utility but the i_count stays equal 1, while write count decreases in negative numbers.
printk("INODES: %s, %p, %ld, ", filename, dentry->d_inode, dentry->d_inode->i_ino);
printk("%d, %d, %d\n", atomic_read(&dentry->d_inode->i_count),>i_dio_count), atomic_read(&dentry->d_inode->i_writecount));
The inode number printed by this code snippet correctly points to my /bin/cat utility ( verified with stat comand
So I am very puzzled, I see that code of fs/namei.c increments and decrements i_count.
Is there any reason that i_count of executable and shared object is not reference counted?
Is there another methods I can distinguish between first time execution and repeated?
Thank you.
Lev.
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies