lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Wed, 15 Apr 2009 17:49:08 -0400
From:	Eric Paris <eparis@...hat.com>
To:	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Cc:	akpm@...ux-foundation.org, john@...nmccutchan.com, rlove@...ve.org,
	viro@...iv.linux.org.uk
Subject: How SHOULD inotify and hardlinks play together?

touch /tmp/file1 /tmp/file2
ln /tmp/file2 /tmp/hardlinktofile2

[A] Set up one inotify watch on /tmp/file2
[B] Set up another inotify watch on /tmp/hardlinktofile2

(they are both watching the same inode/data)

mv /tmp/file1 /tmp/file2

Right now, today, both [A] and [B] are going to get DELETE_SELF and
IGNORED messages and are not going to get any more notifications.

That might be fine for [A] since the pathname it ask to watch doesn't
exist any more (although I argue the inode still does), but that isn't
right for [B] since /tmp/hardlinktofile2 is still there, still it's own
inode, and still able to receive events, be modified, be read, be
deleted, whatever.  But after that mv operation neither [A] nor [B] will
get any more events what-so-ever.

So the question is, should inotify continue to clear all watches on an
inode when something else is moved on top if it even if i_nlink isn't
going to 0?  If not, should inotify continue to send a DELETE_SELF like
it does today?  Should it instead send an ATTRIB like it does when you
add a hard link?

-Eric

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ