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]
Message-ID: <20131219171201.GD19166@parisc-linux.org>
Date:	Thu, 19 Dec 2013 10:12:02 -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 11:17:28AM -0500, Theodore Ts'o wrote:
> On Thu, Dec 19, 2013 at 08:20:49AM -0700, Matthew Wilcox wrote:
> > We could have ext4_get_xip_mem() check buffer_unwritten(); if it's set,
> > zero the blocks and call ext4_convert_unwritten_extents().  Would that
> > work?
> 
> That would work, but we'd be doing a double write to each data block
> --- first writing all zero's, and then later, writing the actual data.
> So this would halve our write bandwidth, and double the write wear on
> the device.

Once this patch is done that I'm working on in the other thread, the
only place we'll be calling get_xip_mem() is in the page fault path,
which always has to zero no matter whether it's a load or a store.

As I said in my last reply to Dave:

  At this point, I'm thinking a
  custom ->fault handler that looks something like this:

  static int ext4_xip_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
  {
          return xip_fault(vma, vmf, ext4_get_block_write, ext4_end_io_dio);
  }

... 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.

-- 
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