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]
Date:	Thu, 10 Jun 2010 20:09:36 +0800
From:	Tao Ma <tao.ma@...cle.com>
To:	Christoph Hellwig <hch@....de>, Tao Ma <tao.ma@...cle.com>,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	Nick Piggin <npiggin@...e.de>,
	Joel Becker <joel.becker@...cle.com>, mfasheh@...e.com
Subject: Re: [PATCH v3] ocfs2: Let ocfs2_setattr use new truncate sequence.

Joel Becker wrote:
> On Thu, Jun 10, 2010 at 10:27:11AM +0200, Christoph Hellwig wrote:
>   
>> You just leave the duplicate inode_newsize_ok in, but still have
>> one as part of inode_change_ok.  See the previous thread - we'll
>> need to move inode_change_ok to under the cluster locks, both
>> for the truncate and non-truncate case.
>>     
>
> 	Is your concern that the u/gid checks may be against stale ids?
>   
So I think we should have one inode_change_ok before the cluster lock 
and another after the cluster lock.
The first one will save us a lot of cluster lock effort if the user pass 
us the wrong arguments while the later
one will test again with the refreshed inode info.

Regards,
Tao
>   
>>> +		truncate_setsize(inode, attr->ia_size);
>>>       
>> But any reason this isn't done inside the
>>
>>         if (size_change && attr->ia_size != inode->i_size) {
>>
>> conditional above?  You'll never get size and uid/gid changes in the
>> same request, so there won't be any change in behaviour.
>>     
>
> 	I think the code exists as-is so that the i_size update only
> happens after the quota transfer has been approved.  Jan added the quota
> bits in this location.
> 	I can't see a standard posix op that changes size and ids at the
> same time.  I think we just add BUG_ON expressions that ensure such a
> behavior, right?
>
> Joel
>
>   

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