Bug 285019 - [modules, regression] kldload of pf.ko failed - symbol _libmd_SHA512_Init undefined
Summary: [modules, regression] kldload of pf.ko failed - symbol _libmd_SHA512_Init und...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2025-02-24 22:27 UTC by rz-rpi03
Modified: 2025-02-26 16:00 UTC (History)
1 user (show)

See Also:


Attachments
Used almost minimal kernel configuration. (2.38 KB, text/plain)
2025-02-25 17:12 UTC, rz-rpi03
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description rz-rpi03 2025-02-24 22:27:09 UTC
Hello,

after updating CURRENT to main-n275634 loading the pf kernel modude failes now
with the error messages:

  link_elf_obj: symbol _libmd_SHA512_Init undefined
  linker_load_file: /boot/kernel/pf.ko - unsupported file type

SHA512 was introuduced to pf.c by commit
https://cgit.freebsd.org/src/commit/sys/netpfil/pf/pf.c?id=9d5c83a0b84caab2fbc4be22a7008b280aaedc80

Regards, Ralf
Comment 1 Kristof Provost freebsd_committer freebsd_triage 2025-02-24 22:29:31 UTC
Do you have a non-default kernel configuration? The module loads just fine on my machines and in the CI builds, so there's a missing factor here.
Comment 2 rz-rpi03 2025-02-25 17:10:50 UTC
(In reply to Kristof Provost from comment #1)
Exactly. It is based on the standard amd64 MINIMAL-NODEBUG configuration.
Added ROUTE_MPATH, FIB_ALGO, scbus, da, virtio_scsi and
switches off XEN plus COMPAT_FREEBSD*.

So everything extra needed has to be loaded as a kernel module.
Comment 3 Kristof Provost freebsd_committer freebsd_triage 2025-02-25 17:11:37 UTC
(In reply to rz-rpi03 from comment #2)
Please attach your kernel config so I can attempt to reproduce this.
Comment 4 rz-rpi03 2025-02-25 17:12:41 UTC
Created attachment 257924 [details]
Used almost minimal kernel configuration.

Kernel configuration as explained.
Comment 5 commit-hook freebsd_committer freebsd_triage 2025-02-26 15:59:30 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=a6b74183b63ddd5428c68daf7c66d4bb49e3a469

commit a6b74183b63ddd5428c68daf7c66d4bb49e3a469
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2025-02-26 09:52:44 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2025-02-26 14:58:29 +0000

    pf: list dependecy on crypto.ko

    Since 9d5c83a0b84c pf depends on the crypto module (for SHA512_*).
    Explicitly list this dependency.

    PR:             285019
    Sponsored by:   Rubicon Communications, LLC ("Netgate")

 sys/netpfil/pf/pf_ioctl.c | 1 +
 1 file changed, 1 insertion(+)