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-next>] [day] [month] [year] [list]
Date:	Thu, 17 Apr 2014 09:41:45 +0900
From:	Namjae Jeon <namjae.jeon@...sung.com>
To:	Lukáš Czerner <lczerner@...hat.com>
Cc:	linux-ext4 <linux-ext4@...r.kernel.org>
Subject: RE: [PATCH 3/5] ext4: No need to truncate pagecache twice in collapse
 range

> 
> We're already calling truncate_pagecache_range() before we attempt to
> do any actual job so there is not need to truncate pagecache once more
> using truncate_setsize() after we're finished.
> 
> Remove truncate_setsize() and replace it just with i_size_write() note
> that we're holding appropriate locks.
> 
> Signed-off-by: Lukas Czerner <lczerner@...hat.com>

Hi Lukas.

I added this code by getting rewiew from Hugh.
Plz see the disscusion beween Hugh and Dave.

Hugh: But your case is different: collapse is much closer to truncation,
 and if you do not unmap the private COW'ed pages, then pages left
 behind beyond the EOF will break the spec that requires SIGBUS when
 touching there, and pages within EOF will be confusingly derived
 from file data now belonging to another offset or none (move these
 pages within the user address space? no, I don't think anon_vmas
 would allow that, and there may be no right place to move them).
 
Dave: See above - we never leave pages beyond the new EOF because setting
 the new EOF is a truncate operation that calls
 truncate_setsize(inode, newsize).
 
Hugh: Right, thanks, I now see the truncate_setsize() in the xfs case -
 though not in the ext4 case, which looks as if it's just doing an
 i_size_write() afterwards.

Dave: So that's a bug in the ext4 code ;)

truncate_setsize is not needed in case Hugh pointed out ?

Thanks!

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