linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] setxattr bugs
@ 2013-02-03  4:30 Al Viro
  2013-02-03 13:59 ` Dave Kleikamp
  2013-02-05  2:14 ` Jeff Mahoney
  0 siblings, 2 replies; 4+ messages in thread
From: Al Viro @ 2013-02-03  4:30 UTC (permalink / raw)
  To: linux-kernel; +Cc: Linus Torvalds, linux-fsdevel, Jeff Mahoney, Dave Kleikamp

	* JFS, since 2005: setxattr(name, "system.posix_acl_access", NULL, 0, 0)
succeeds, creating an empty EA with "system.posix_acl_access" as name.
Validity checks should apply _after_
        if (value == NULL) {    /* empty EA, do not remove */
                value = "";
                value_len = 0;
        }
and not before it.
	* reiserfs, since 2009: setxattr(name, attr_name, NULL, 0, 0) is
treated as removexattr(name, attr_name), not as emptying given xattr.

	The question is, does either of those cross into "established
weirdness in ABI" or are they still at the "bugs to be fixed" stage?

	FWIW, I'm seriously tempted to stop passing NULL as the
third argument of ->setxattr(), essentially taking all those
if (!value) value = ""; pieces from individual ->setxattr() instances
to __vfs_setxattr_noperm() (all other callers of ->setxattr() never
pass NULL data or 0 size, so it's irrelevant for them).  Would fix
both jfs and reiserfs weirdness....

	Objections?

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-02-05 17:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-03  4:30 [RFC] setxattr bugs Al Viro
2013-02-03 13:59 ` Dave Kleikamp
2013-02-05  2:14 ` Jeff Mahoney
2013-02-05 17:14   ` Casey Schaufler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).