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: <Pine.LNX.4.64.0703051333140.3998@woody.linux-foundation.org>
Date:	Mon, 5 Mar 2007 13:43:03 -0800 (PST)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Dave Kleikamp <shaggy@...ux.vnet.ibm.com>
cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Will Trives <will@...vescon.com.au>,
	linux-kernel@...r.kernel.org,
	Nick Piggin <nickpiggin@...oo.com.au>,
	Chuck Ebbert <cebbert@...hat.com>
Subject: Re: [PATCH] fs: nobh_truncate_page() fix



On Mon, 5 Mar 2007, Dave Kleikamp wrote:
> 
> This fixes a regression caused by 22c8ca78f20724676b6006232bf06cc3e9299539.
> 
> nobh_prepare_write() no longer marks the page uptodate, so
> nobh_truncate_page() needs to do it.

I'm not convinced...

If the page wasn't up-to-date from before, it's *not* necessarily 
up-to-date after the truncate either! So why do we have that at all?

The same comment is true of "nobh_commit_write()" (which _does_ have the 
SetPageUptodate() there).

So I have three questions:

 - why is that valid in the first place (the page is *not* guaranteed to 
   be up-to-date as far as I can see!)

 - why is it valid to do in "nobh_commit_write()"

 - why doesn't "nobh_truncate_page()"
	(a) call nobh_prepare_write() through an indirect pointer?
	(b) call nobh_commit_write() at all? (Yeah, I realize it's because 
	    of brokenness with i_size, so this is more of a "those 
	    functions should be factored out properly" statement rather 
	    than a question.

IOW, I'm sure your patch _fixes_ something, but no, it's certainly not 
obvious to me. A few added comments would be good.. Why is it ok to do 
this on a page that wasn't up-to-date before (since obviously, if it *was* 
up-to-date, it's pointless).

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