Page MenuHomeFreeBSD

Correct module symbol export handling
ClosedPublic

Authored by emaste on Feb 9 2018, 6:43 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 11 2024, 1:09 AM
Unknown Object (File)
Jan 20 2024, 3:25 PM
Unknown Object (File)
Jan 20 2024, 3:05 PM
Unknown Object (File)
Jan 13 2024, 5:39 AM
Unknown Object (File)
Jan 10 2024, 1:54 AM
Unknown Object (File)
Jan 6 2024, 4:45 PM
Unknown Object (File)
Dec 11 2023, 6:12 PM
Unknown Object (File)
Dec 3 2023, 7:22 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.