lkml.org 
[lkml]   [2006]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] sendfile compat functions on x86_64 and ia64
On Fri, 5 May 2006, Andi Kleen wrote:

> With your change there wouldn't be any sign extension and rw_verify_area
> couldn't reject negative values them anymore.
>
> I think it would be a wrong change because it would differ from a native
> 32bit kernel.

No...

On a 32 bit kernel (and on a 64 bit kernel using the native interface),
count is passed to sendfile as unsigned. rw_verify_area explicitly casts
to signed before checking for negativeness. The only place anywhere in the
kernel that count is signed (other than where rw_verify area explicitly
casts it for one test) is in the declaration of sys32_sendfile in the
x86_64 compat code. I'm pretty sure it's supposed to be unsigned there
too, and the current code is a typo.

Alexey
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-05-05 22:46    [W:0.040 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site