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 Apr 2014 20:43:46 +0200
From:	Jan Kara <jack@...e.cz>
To:	Matthew Wilcox <willy@...ux.intel.com>
Cc:	Jan Kara <jack@...e.cz>,
	Matthew Wilcox <matthew.r.wilcox@...el.com>,
	linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org,
	Ross Zwisler <ross.zwisler@...ux.intel.com>
Subject: Re: [PATCH v7 18/22] xip: Add xip_zero_page_range

On Thu 10-04-14 10:27:29, Matthew Wilcox wrote:
> On Wed, Apr 09, 2014 at 12:15:12PM +0200, Jan Kara wrote:
> > > +		/*
> > > +		 * ext4 sometimes asks to zero past the end of a block.  It
> > > +		 * really just wants to zero to the end of the block.
> > > +		 */
> >   Then we should really fix ext4 I believe...
> 
> Since I didn't want to do this ...
> 
> > > +/* Can't be a function because PAGE_CACHE_SIZE is defined in pagemap.h */
> > > +#define dax_truncate_page(inode, from, get_block)	\
> > > +	dax_zero_page_range(inode, from, PAGE_CACHE_SIZE, get_block)
> >                                          ^^^^
> > This should be (PAGE_CACHE_SIZE - (from & (PAGE_CACHE_SIZE - 1))), shouldn't it?
> 
> ... I could get away without doing that ;-)
  I understand but ultimately the API is cleaner if it doesn't allow size
past end of block. So IMHO we shouldn't introduce new places that call the
function like this and we should fix places that do it now (make it
WARN_ON_ONCE() and let ext4 guys do the work for you ;).

								Honza
-- 
Jan Kara <jack@...e.cz>
SUSE Labs, CR
--
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