Page MenuHomeFreeBSD

Correct module symbol export handling
ClosedPublic

Authored by emaste on Feb 9 2018, 6:43 PM.
Tags
None
Referenced Files
F166739702: D14284.diff
Sun, Aug 16, 12:40 AM
Unknown Object (File)
Wed, Aug 12, 4:25 AM
Unknown Object (File)
Tue, Aug 11, 12:45 PM
Unknown Object (File)
Tue, Aug 11, 12:44 PM
Unknown Object (File)
Sun, Aug 9, 3:14 PM
Unknown Object (File)
Sat, Aug 8, 11:16 PM
Unknown Object (File)
Sat, Aug 8, 8:52 AM
Unknown Object (File)
Fri, Aug 7, 10:38 AM
Subscribers

Details

Summary

EXPORT_SYMS can be set to YES, NO, a list of symbols to export from a module, or to a filename containing such a list. For the case that it is set to a symbol list, replace spaces in the list with newlines, so the created file is in the format expected by kmod_syms.awk.

Sponsored by: Turing Robotic Industries Inc.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Feb 9 2018, 7:00 PM
emaste added a subscriber: stevek.

Microoptimize away a fork+exec of tr, from @stevek

This revision now requires review to proceed.Feb 9 2018, 7:08 PM

Looks ok to me. Did you have a test kernel module you used to test this?

In D14284#300389, @jhb wrote:

Looks ok to me. Did you have a test kernel module you used to test this?

I discovered this while trying to test an in-progress arm64 linuxolator port, observed by comparing symbols listed in readelf -s / nm -D with what I expected. I'll see about adding an explicit test module to demonstrate the issue, although the fact that amd64 uses .o kernel modules is a confounding issue.

I was just curious, I don't think there's probably a need to make a test module (though having a real test for this might be nice). I had figured you had run into it somehow and was wondering if that somehow had turned into an easy test to verify correctness. :)

This revision is now accepted and ready to land.Feb 12 2018, 9:55 PM
In D14284#300508, @jhb wrote:

I was just curious, I don't think there's probably a need to make a test module (though having a real test for this might be nice). I had figured you had run into it somehow and was wondering if that somehow had turned into an easy test to verify correctness. :)

It's proved difficult to verify end-to-end behaviour, because symbol handling in our kernel loader is somewhat wonky; depending on architecture symbols may come from .dynsym or .symtab.

This revision was automatically updated to reflect the committed changes.