Page MenuHomeFreeBSD

libmd, kern, stand: consolidate md5 implementations (NFC)
AcceptedPublic

Authored by kevans on Mar 9 2022, 3:34 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 11, 12:30 PM
Unknown Object (File)
Jan 12 2024, 2:33 PM
Unknown Object (File)
Dec 23 2023, 12:54 AM
Unknown Object (File)
Nov 17 2023, 8:46 PM
Unknown Object (File)
Nov 17 2023, 3:25 PM
Unknown Object (File)
Nov 10 2023, 3:46 AM
Unknown Object (File)
Nov 9 2023, 6:15 AM
Unknown Object (File)
Oct 9 2023, 2:35 AM
Subscribers

Details

Summary

Reduce the number of md5c.c between the three of these from two to one
by just reaching into the kernel build for both userland builds. The
precedent for this already exists for sha2 in both cases.

_libmd_ symbol privatization bits have been moved to sys/md5.h and
md5.h remains to #include <sys/md5.h> for compatibility.

This stops exporting MD5Pad() in the process because the kernel stopped
exporting it in 502a35d60f4c. soversion is bumped accordingly.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 44711
Build 41599: arc lint + arc unit

Event Timeline

kevans requested review of this revision.Mar 9 2022, 3:34 AM

Interesting, there are many other copies of libmd around (other BSDs, embedded in various software) that include MD5Pad, but checking Debian Code Search I see (unsurprisingly) no users. I am a little torn as our shlib guidelines desire avoiding version bumps, but it would also be silly to restore MD5Pad just to satisfy that.

Interesting, there are many other copies of libmd around (other BSDs, embedded in various software) that include MD5Pad, but checking Debian Code Search I see (unsurprisingly) no users. I am a little torn as our shlib guidelines desire avoiding version bumps, but it would also be silly to restore MD5Pad just to satisfy that.

Yeah; I did a couple other things later in the stack to try and help justify it, as well. I think the *Transform symbols are in the same boat and they keep causing problems with various compiler/linker/flag combos because the implementation symbols should be exported as well.

This revision is now accepted and ready to land.Mar 9 2022, 6:42 PM
ObsoleteFiles.inc
56

Is there a reason this library isn't versioned?

sys/kern/md5c.c
133

These shouldn't have spaces, if you're changing anyway...

ObsoleteFiles.inc
56

It is, but a function is being removed

sys/kern/md5c.c
133

should probably do a style/K&R pass over this whole file first

ObsoleteFiles.inc
56

There's a later change in this stack that introduces symbol versioning