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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131016070528.GB18721@infradead.org>
Date:	Wed, 16 Oct 2013 00:05:28 -0700
From:	Christoph Hellwig <hch@...radead.org>
To:	Dave Chinner <david@...morbit.com>
Cc:	Christoph Hellwig <hch@...radead.org>,
	Dave Jones <davej@...hat.com>, xfs@....sgi.com,
	Linux Kernel <linux-kernel@...r.kernel.org>,
	Al Viro <viro@...iv.linux.org.uk>
Subject: Re: fs/attr.c:notify_change locking warning.

On Wed, Oct 16, 2013 at 08:36:18AM +1100, Dave Chinner wrote:
> Sure, but file_remove_suid() doesn't actually modify any VFS inode
> structures until we process the flags and the modifications within
> ->setattr, which in XFS are all done under the XFS_ILOCK_EXCL via
> xfs_setattr_mode(). i.e. both the VFS and XFS inodes S*ID bits are
> removed only under XFS_ILOCK_EXCL....

It can set S_NOSEC after calling into ->setattr at least.

> Hence I see no point in adding extra serialisation via the i_mutex
> to this path when we can just do something like:
> 
> 	killsuid = should_remove_suid(file->f_path.dentry);
> 	if (killsuid) {
> 		struct iattr	newattr;
> 
> 		newattr.ia_valid = ATTR_FORCE | killsuid;
> 		error = xfs_setattr_nonsize(ip, &newattr, 0);
> 		if (error)
> 			return error;
> 	}

We'd still need all the other magic in file_remove_suid, which I don't
actually quite undersdtand fully yet.

--
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