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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <E1KBXOs-00074q-NU@pomaz-ex.szeredi.hu>
Date:	Wed, 25 Jun 2008 17:59:14 +0200
From:	Miklos Szeredi <miklos@...redi.hu>
To:	johnpol@....mipt.ru
CC:	miklos@...redi.hu, jens.axboe@...cle.com,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org, torvalds@...ux-foundation.org,
	akpm@...ux-foundation.org, hugh@...itas.com,
	nickpiggin@...oo.com.au
Subject: Re: [patch 1/2] mm: dont clear PG_uptodate in invalidate_complete_page2()

> > > > > Like __block_prepare_write()?
> > > > 
> > > > That's called with the page locked and page->mapping verified.
> > > 
> > > Only when called via standard codepath.
> > 
> > It would be a grave error to call it without the page lock.
> 
> Page is locked of course, but invalidated, removed from all trees and
> caches, i.e. grab, lock, check, unlock... invalidate, write into that
> page should fail, but it will not, since page is uptodate and
> prepare_write does not check mapping at all.

But callers do check after having locked the page.

> > > Instead of returning error when reading from invalid page, now you
> > > return old content of it?
> > 
> > No, instead of returning a short count, it is now returning old
> > content.
> 
> Or instead of returning error or zero and relookup page eventually,
> which can already contain new data, we get old data.

Umm, it doesn't make any sense to try to always get fresh data.  If
you do read() on a file, the data may become old and invalid a
millisecond after the read finished.  We can't and needn't do anything
about this.

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