lkml.org 
[lkml]   [2006]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: reiserfs NET=n build error
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Al Viro wrote:
> On Sun, Nov 19, 2006 at 11:04:33AM -0800, Randy Dunlap wrote:
>> Andi Kleen wrote:
>>>>> I would copy a relatively simple C implementation, like
>>>>> arch/h8300/lib/checksum.c
>>>> As long as the h8300 version has the same output as the x86 version.
>>> The trouble is that the different architecture have different output
>>> for csum_partial. So you already got a bug when someone wants to move
>>> file systems.
>>>
>>> -Andi
>> That argues for having only one version of it (in a lib.; my preference)
>> -or- Every module having its own local copy/version of it. :(
>
> Wrong. csum_partial() result is defined modulo 0xffff and it's basically
> "whatever's convenient as intermediate for this architecture".
>
> reiserfs use of it is just plain broken. net/* is fine, since all
> final uses are via csum_fold() or equivalents.
>
> Note that reiserfs use is broken in another way: it takes fixed-endian value
> and feeds it to cpu_to_le32(). IOW, even if everything had literally the
> same csum_partial(), the value it shits on disk would be endian-dependent.

Oh great. Even better. :(

- -Jeff

- --
Jeff Mahoney
SUSE Labs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFFYNtqLPWxlyuTD7IRAux8AKCbxW4zX5Q7y8LfPT0FY/W4A8v0PQCggV11
EbMvTGkAb5WXa0f7EgUz5Qk=
=Zm0q
-----END PGP SIGNATURE-----
-
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-11-19 23:33    [W:0.074 / U:1.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site