lkml.org 
[lkml]   [2012]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 1/1] vfs: iversion truncate bug fix
From
Date
On Wed, 2012-01-04 at 18:06 -0800, Greg KH wrote:
> On Wed, Jan 04, 2012 at 04:46:38PM -0800, Andrew Morton wrote:
> > On Wed, 04 Jan 2012 19:33:49 -0500
> > Mimi Zohar <zohar@linux.vnet.ibm.com> wrote:
> >
> > > On Wed, 2012-01-04 at 15:28 -0800, Andrew Morton wrote:
> > > > On Thu, 22 Dec 2011 08:26:30 -0500
> > > > Mimi Zohar <zohar@linux.vnet.ibm.com> wrote:
> > > >
> > > > > On Thu, 2011-12-22 at 12:54 +0200, Dmitry Kasatkin wrote:
> > > > > > When a file is truncated with truncate()/ftruncate() and then closed,
> > > > > > iversion is not updated. This patch uses ATTR_SIZE flag as an indication
> > > > > > to increment iversion.
> > > > > >
> > > > > > Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
> > > > >
> > > > > Acked-by: Mimi Zohar <zohar@us.ibm.com>
> > > > > (Stable should be cc'ed on this patch.)
> > > >
> > > > why?
> > >
> > > Why backported?
> >
> > Yes. If you want to submit the patch to the -stable maintainer then
> > you should explain to him why the fix is important enough to warrant
> > doing that. That involves explaining the user-visible effects of
> > the bug.
> >
> > > The IMA measurement list could be incomplete.
> >
> > In more detail than this. Maybe he knows what the above sentence
> > means, but I sure don't.
>
> Nope, I don't either :)

On fput(), i_version is used to detect and flag files that have changed
and need to be re-measured in the IMA measurement policy. When a file
is truncated with truncate()/ftruncate() and then closed, i_version is
not updated. As a result, although the file has changed, it will not be
re-measured and added to the IMA measurement list on subsequent access.

Mimi



\
 
 \ /
  Last update: 2012-01-05 05:23    [W:0.076 / U:0.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site