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:	Fri, 20 Dec 2013 11:17:31 -0700
From:	Matthew Wilcox <matthew@....cx>
To:	Theodore Ts'o <tytso@....edu>
Cc:	Dave Chinner <david@...morbit.com>,
	Matthew Wilcox <matthew.r.wilcox@...el.com>,
	linux-ext4@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH v3 0/3] Add XIP support to ext4

On Thu, Dec 19, 2013 at 12:18:48PM -0500, Theodore Ts'o wrote:
> On Thu, Dec 19, 2013 at 10:12:02AM -0700, Matthew Wilcox wrote:
> > 
> > ... I think it'll actually be ext4_get_block_fault, not _write, and it
> > will include code to zero the returned blocks if they're uninitialised.
> 
> I assume what you mean here is if we see that the blocks are
> uninitialized, we don't need to read from the persistent memory at
> all; we can just map in a zeroed page, hopefully one from our stock of
> pre-zeroed pages.  Yes?

Maybe.  We have a tension here between wanting to avoid unnecessary
writes to the media (as you say, wear is going to be important for some
media, if not all) and wanting to not fragment files (both for extent
tree compactness and so that we can use PMD or even PGD mappings if the
stars align).  It'll be up to the filesystem whether it chooses to satisfy
the get_block request with something prezeroed, or something that aligns
nicely.  Ideally, it'll be able to find a block of storage that does both!

Actually, I now see a second way to read what you wrote.  If you meant
"we can map in ZERO_PAGE or one of its analogs", then no.  The amount
of cruft that optimisation added to the filemap_xip code is horrendous.
I don't think it's a particularly common workload (mmap a holey file,
read lots of zeroes out of it without ever writing to it), so I think
it's far better to allocate a page of storage and zero it.

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
--
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