libnv and libnvpair have aliased symbols, and as a result a single process which
dlopens a shared object that is dynamically linked to libnv and another to
libnvpair will wind up with a single set of resolved symbols for those in
conflict, which invariably breaks since libnv and libnvpair are not ABI
compatible. This change introduces symbol versioning for both libnv and
libnvpair to provide the necessary distinction in runtime linked symbols.
Details
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 45753 Build 42641: arc lint + arc unit
Event Timeline
This looks fine to my eye, though I know Kyle has been tracking this more closely than I have...
I think my biggest concern as of right now is whether I did the Right Thing with the msgio symbols. I deemed them to not be part of the interface and therefore made them local symbols without a namespace prefix.
sys/sys/nv_namespace.h | ||
---|---|---|
37 | I think I'm pretty happy with this, though let's add some internal padding around (front and end of) the big ol' list of defines. |
I think this looks good to me, modulo a need to bump shlib versions for both libs (iirc; at least libnv) -- I've requested an exp-run with versions bumped (and appropriate entries added to ObsoleteFiles.inc): https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264838
exp-run looks good, assuming this is tested to solve the problem run into at Netgate, I think I'm happy with it
I haven't yet done a full build against main with this patch, but versioning alone solved our linking issues so I don't expect adding differentiation to symbol names to interfere with that. I'll try to get that done today.
cddl/lib/libnvpair/Symbol.map | ||
---|---|---|
2 | Why do we need to version these? The names don't clash any more. This feels like a relic from the old version-both-the-symbol-sets approach? |
cddl/lib/libnvpair/Symbol.map | ||
---|---|---|
2 | Personally I agree, if nobody has any objections I'd be happy to rip the libnvpair symbol versions out. |
This works in pfSense as expected, our pfsense and libbe PHP modules, when both loaded, do not hit errors due to symbols from one of libnv or libnvpair being aliased.