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: <20070602150228.GI32105@kernel.dk>
Date:	Sat, 2 Jun 2007 17:02:29 +0200
From:	Jens Axboe <jens.axboe@...cle.com>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Eric Dumazet <dada1@...mosbay.com>,
	linux-kernel@...r.kernel.org, cotte@...ibm.com, hugh@...itas.com,
	neilb@...e.de, zanussi@...ibm.com, hch@...radead.org
Subject: Re: [PATCH] sendfile removal

On Fri, Jun 01 2007, H. Peter Anvin wrote:
> > So there's a few things to take away from this:
> > 
> >  - regular file access MUST NOT return EAGAIN just because a page isn't 
> >    in the cache. Doing so is simply a bug. No ifs, buts or maybe's about 
> >    it!
> > 
> >    Busy-looping is NOT ACCEPTABLE!
> > 
> >  - you *could* make some alternative conventions:
> > 
> > 	(a) you could make O_NONBLOCK mean that you'll at least 
> > 	    guarantee that you *start* the IO, and while you never return 
> > 	    EAGAIN, you migth validly return a _partial_ result!
> > 
> > 	(b) variation on (a): it's ok to return EAGAIN if _you_ were the 
> > 	    one who started the IO during this particular time aroudn the 
> > 	    loop. But if you find a page that isn't up-to-date yet, and 
> > 	    you didn't start the IO, you *must* wait for it, so that you 
> > 	    end up returning EAGAIN atmost once! Exactly because 
> > 	    busy-looping is simply not acceptable behaviour!
> 
> (b) seems really ugly.  (a) is at least well-defined.  Either seems
> wrong, though.

I totally agree, b) would get nasty. And while a) isn't perfect by any
means, I do follow Linus' logic and agree it's probably the best (only?)
way to handle it.

-- 
Jens Axboe

-
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