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: <20061011165717.GB5259@wotan.suse.de>
Date:	Wed, 11 Oct 2006 18:57:18 +0200
From:	Nick Piggin <npiggin@...e.de>
To:	Linus Torvalds <torvalds@...l.org>
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, Oct 11, 2006 at 09:21:16AM -0700, Linus Torvalds wrote:
> 
> 
> On Tue, 10 Oct 2006, Andrew Morton wrote:
> >
> > On Wed, 11 Oct 2006 15:39:22 +1000
> > Nick Piggin <nickpiggin@...oo.com.au> wrote:
> > 
> > > But I see that it does read twice. Do you want that behaviour retained? It
> > > seems like at this level it would be logical to read it once and let lower
> > > layers take care of any retries?
> > 
> > argh.  Linus has good-sounding reasons for retrying the pagefault-path's
> > read a single time, but I forget what they are.  Something to do with
> > networked filesystems?  (adds cc)
> 
> Indeed. We _have_ to re-try a failed IO that we didn't start ourselves.
> 
> 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?

> There is another issue too: even if the page was marked as having an error 
> when we entered (and no longer locked - maybe the IO failed last time 
> around), we should _still_ re-try. It might be a temporary error that has 
> since gone away, and if we don't re-try, we can end up in the totally 
> untenable situation where the kernel makes a soft error into a hard one. 

Yes, and in that case I think the page should be !Uptodate, so no
problem there.
-
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