Bug 291272 - tcp_bbr.ko, tcp_rack.ko fail to load with module loader local symbol resolution disabled
Summary: tcp_bbr.ko, tcp_rack.ko fail to load with module loader local symbol resoluti...
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 16.0-CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks: 207898
  Show dependency treegraph
 
Reported: 2025-11-28 18:14 UTC by Ed Maste
Modified: 2025-12-03 12:26 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer freebsd_triage 2025-11-28 18:14:52 UTC
See https://lists.freebsd.org/archives/freebsd-current/2025-November/009500.html for background.

To reproduce, set
debug.link_elf_leak_locals=0
debug.link_elf_obj_leak_locals=0
then

# kldload tcp_bbr.ko
TCP HPTS started 1 ((unbounded)) swi interrupt threads
link_elf_obj: symbol tcp_hptsi_pace undefined
linker_load_file: /boot/kernel/tcp_bbr.ko - unsupported file type
kldload: an error occurred while loading module tcp_bbr.ko. Please check dmesg(8) for more details.
# kldload tcp_rack.ko
TCP HPTS started 1 ((unbounded)) swi interrupt threads
link_elf_obj: symbol tcp_hptsi_pace undefined
linker_load_file: /boot/kernel/tcp_rack.ko - unsupported file type
kldload: an error occurred while loading module tcp_rack.ko. Please check dmesg(8) for more details.

The dependent module's Makefile (i.e., the one containing tcp_hptsi_pace) should have an EXPORT_SYMS= line that lists all of the symbols to be intentionally exported.

Another option is to just set EXPORT_SYMS=YES.  An explicit export list is preferred over EXPORT_SYMS=YES, unless we explicitly want all symbols exported.
Comment 1 Rupesh Pilania 2025-12-03 12:26:13 UTC
A Differential review has been created for this fix: https://reviews.freebsd.org/D54046