Re: MD4 and MD5 library routines (was CIFS filesystem for Linux 2.5_

From: Steven French (sfrench@us.ibm.com)
Date: Thu Oct 10 2002 - 22:51:41 EST


>> sfrench@us.ibm.com said:
>> > fs/cifs/md4.c | 209 +++
>> > fs/cifs/md5.c | 363 +++++
>> > fs/cifs/md5.h | 38
>>
>> Unless these are somehow CIFS-specific, they should live in linux/lib/
>
>This would have the disadvantage that they would need to be always
compiled into the
>kernel, even though it may not need it. And we already have code bloat
problems,
>no need to make it worse.
>
>Making them modular also isn't good. Each module takes a 4k page at least,
so you
>would waste a lot of memory because they're smaller than 4k.
>
>As long as they are not used by anything else it's probably best to keep
it
>where they are.
>
>-Andi

The routines are small enough, less than 500 loc total, that it would not
make a whole lot of difference either way. Although I noticed a few
different places where MD5 is implemented in other parts of the kernel, the
HMAC-MD5 support (in md5.c) needed for signing smb frames is probably not
needed by anyone else (except PPP?). I did not see any places (other than
cifs) that depend on md4 so that seems like it would not make sense to move
even though the code is pretty generic. The ASN decoding routines on the
other hand (used e.g. by snmp and also will be needed in the future by the
cifs vfs for simple SPNEGO-like parsing of the session establishment frame)
might end up being useful to move into a common library in the long run.

Steve French
Senior Software Engineer
Linux Technology Center - IBM Austin
phone: 512-838-2294
email: sfrench@us.ibm.com

-
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/



This archive was generated by hypermail 2b29 : Tue Oct 15 2002 - 22:00:40 EST