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:	Wed, 11 Oct 2006 10:11:43 -0700 (PDT)
From:	Linus Torvalds <torvalds@...l.org>
To:	Nick Piggin <npiggin@...e.de>
cc:	Andrew Morton <akpm@...l.org>,
	Nick Piggin <nickpiggin@...oo.com.au>,
	Linux Memory Management <linux-mm@...ck.org>,
	Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: SPAM: Re: [patch 2/5] mm: fault vs invalidate/truncate race fix



On Wed, 11 Oct 2006, Nick Piggin wrote:
> > 
> > The original IO could have been started by a person who didn't have 
> > permissions to actually carry it out successfully, so if you enter with 
> > the page locked (because somebody else started the IO), and you wait for 
> > the page and it's not up-to-date afterwards, you absolutely _have_ to try 
> > the IO, and can only return a real IO error after your _own_ IO has 
> > failed.
> 
> Sure, but we currently try to read _twice_, don't we?

Well, we have the read-ahead, and then the real read. By the time we do 
the real read, we have forgotten about the read-ahead details, so..

We also end up often having a _third_ one, simply because the _user_ tries 
it twice: it gets a partial IO read first, and then tries to continue and 
won't give up until it gets a real error.

So yes, we can end up reading it even more than twice, if only due to 
standard UNIX interfaces: you always have to have one extra "read()" 
system call in order to get the final error (or - much more commonly - 
EOF, of course).

If we tracked the read-aheads that _we_ started, we could probably get rid 
of one of them.

			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