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, Jun 20, 7:38 PM
Unknown Object (File)
Thu, Jun 20, 11:13 AM
Unknown Object (File)
Sat, Jun 15, 12:24 AM
Unknown Object (File)
Thu, May 30, 8:57 PM
Unknown Object (File)
Thu, May 23, 11:01 AM
Unknown Object (File)
May 21 2024, 10:30 AM
Unknown Object (File)
May 18 2024, 8:04 PM
Unknown Object (File)
Apr 20 2024, 9:00 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