From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Piggin Subject: Re: [PATCH] LSM: Remove unused time_attrs argument. Date: Wed, 2 Jun 2010 13:59:21 +1000 Message-ID: <20100602035921.GI9453@laptop> References: <20100601155055.GZ9453@laptop> <20100601172425.GC9453@laptop> <201006020328.o523SOJ7073247@www262.sakura.ne.jp> <20100602035012.GH9453@laptop> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-security-module@vger.kernel.org, torvalds@linux-foundation.org, linux-fsdevel@vger.kernel.org To: Tetsuo Handa Return-path: Received: from cantor.suse.de ([195.135.220.2]:49213 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755721Ab0FBD7Y (ORCPT ); Tue, 1 Jun 2010 23:59:24 -0400 Content-Disposition: inline In-Reply-To: <20100602035012.GH9453@laptop> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Jun 02, 2010 at 01:50:12PM +1000, Nick Piggin wrote: > On Wed, Jun 02, 2010 at 12:28:24PM +0900, Tetsuo Handa wrote: > > When commit be6d3e56a6b9b3a4ee44a0685e39e595073c6f0d "introduce new LSM hooks > > where vfsmount is available." was proposed, regarding security_path_truncate(), > > only "struct file *" argument (which AppArmor wanted to use) was removed. > > But length and time_attrs arguments are not used by TOMOYO nor AppArmor. > > Well if length is not used either, can we remove that too seeing as > we're changing the API anyway. > > Length would also be an iffy thing to use here because we're not > holding the i_mutex, so it may change between being checked and > truncate checking it. To clarify, not the length of course, but the i_size. That could be a problem if a security module thought it could allow only expanding truncates by checking i_size, for example.