httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexey Toptygin <alex...@freeshell.org>
Subject Re: apr_brigade_insert_file() LFS/Linux issues
Date Thu, 04 May 2006 23:52:55 GMT
On Thu, 4 May 2006, Alexey Toptygin wrote:

> Sorry, but are you running a 32 bit userland with your 64 bit kernel? If
> you are, then the compatibility layer is involved, and sendfile is still 
> taking 32 bit values...

Never mind, on reading the thread more closely, I see that you said 64 
bit.

> I think I see a kernel bug here that would cause any count > (2 ** 31 - 1) to 
> get garbled, but only with 32-bit compat mode and only on x86_64 (not ia64, 
> the code there seems sane).

It turns out that you can never hit this - counts between 2**31 and 2**32 
get (impropperly) sign-extended to 64 bits, and then put in an unsigned 64 
bit variable - but the very next thing that touches that variable (2 
functions away) casts it to signed and returns EINVAL if it's negative.

Sorry for the noise.

 			Alexey

Mime
View raw message