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>] [day] [month] [year] [list]
Date:	Wed, 16 Apr 2014 07:36:35 +1000
From:	Dave Chinner <david@...morbit.com>
To:	Lukáš Czerner <lczerner@...hat.com>
Cc:	Christoph Hellwig <hch@...radead.org>,
	linux-fsdevel@...r.kernel.org, ceph-devel@...r.kernel.org,
	linux-ext4@...r.kernel.org, xfs@....sgi.com
Subject: Re: [PATCH 2/4] fs: Prevent doing FALLOC_FL_ZERO_RANGE on append
 only file

On Tue, Apr 15, 2014 at 03:09:42PM +0200, Lukáš Czerner wrote:
> On Sat, 12 Apr 2014, Christoph Hellwig wrote:
> 
> > Date: Sat, 12 Apr 2014 08:19:35 -0700
> > From: Christoph Hellwig <hch@...radead.org>
> > To: Lukas Czerner <lczerner@...hat.com>
> > Cc: linux-fsdevel@...r.kernel.org, ceph-devel@...r.kernel.org,
> >     linux-ext4@...r.kernel.org, xfs@....sgi.com
> > Subject: Re: [PATCH 2/4] fs: Prevent doing FALLOC_FL_ZERO_RANGE on append only
> >      file
> > 
> > On Fri, Apr 11, 2014 at 08:57:43PM +0200, Lukas Czerner wrote:
> > >  	/*
> > > -	 * It's not possible to punch hole or perform collapse range
> > > -	 * on append only file
> > > +	 * It's not possible to punch hole, perform collapse range
> > > +	 * or zero range on append only file
> > >  	 */
> > > -	if (mode & (FALLOC_FL_PUNCH_HOLE | FALLOC_FL_COLLAPSE_RANGE)
> > > +	if (mode & (FALLOC_FL_PUNCH_HOLE | FALLOC_FL_COLLAPSE_RANGE |
> > > +		    FALLOC_FL_ZERO_RANGE)
> > 
> > Might be better to make this a negative test fo the operation that is
> > allowed on an appen only file.  That's also much better future proof.
> > 
> 
> True, it might be better to do it this way:
> 
> if (mode & ~FALLOC_FL_KEEP_SIZE && IS_APPEND(inode))

if ((mode & ~FALLOC_FL_KEEP_SIZE) && IS_APPEND(inode))

:)

Cheers,

Dave.
-- 
Dave Chinner
david@...morbit.com
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ