Re: [PATCH] sendfile compat functions on x86_64 and ia64

From: Andi Kleen
Date: Sat May 06 2006 - 04:46:31 EST



> I agree that this test will pass if we change the declaration of count to
> u32 in sys32_sendfile,

Again the compat layer is only supposed to be as good as a native 32bit
kernel. You try to make it better by allowing values that a 32bit
kernel wouldn't allow. But that's not its goal - it just wants to be
as compatible as possible.

> The only thing my patch does other than changing the signedness of count
> in the declaration of x86_64 sys32_sendfile is relabelling the types of
> offset and count to compat_off_t and compat_size_t. The underlying types
> shouldn't change as a result, but I think this way what is going on is
> much clearer: the compat_ types were defined for exactly this scenario of
> 64 bit kernel functions getting off_t and size_t values from a 32 bit
> userland, no?

The goal isn't to be clear, the goal is to be compatible.

Please stop continue arguing about this - it's useless.

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