Page Fault in Releng 14.1 Carp Module

Hello. I am building a custom kernel for pcengines APU4 with intent of disabling module loading.

Everything is going well until I ran into adding device carp. When i compile the kernel and reboot, I receive the following page fault on device carp regarding INET6. Not sure why I am running into this as IPv6 is enabled, and didn't find anything online with similar errors. I'm guessing I need to add a device or option? I noted inet6_support enables module loading for inet6.

Apologies on my ignorance, Appreciate any guidance.

Kernel Page Fault: (I'm guessing i'm missing something).
Code:
uart1: <16550 or compatible> port 0x2f8-0x2ff irq 3 on acpi0
orm0: <ISA Option ROM> at iomem 0xee800-0xeffff pnpid ORM0000 on isa0
hwpstate0: <Cool`n'Quiet 2.0> on cpu0
Timecounter "TSC" frequency 998127874 Hz quality 1000
Timecounters tick every 1.000 msec
WARNING: Adding ifaddrs to all fibs has been turned off by default. Consider tuning net.add_addr_allfibs if needed
carp: error 17 registering with INET6
kernel trap 12 with interrupts disabled
Code:
Fatal trap 12: page fault while in kernel mode
cpuid = 2; apic id = 02
fault virtual address   = 0x20
fault code              = supervisor read data, page not present
instruction pointer     = 0x20:0xffffffff80623b56
stack pointer           = 0x28:0xffffffff8143af30
frame pointer           = 0x28:0xffffffff8143af50
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags        = resume, IOPL = 0
current process         = 0 (swapper)
rdi: 0000000000000000 rsi: 0000000000000000 rdx: ffffffff81612000
rcx: 0000000000000002  r8: 0000000000000002  r9: ffffffff8143aed8
rax: 0000000000000000 rbx: 0000000000000000 rbp: ffffffff8143af50
r10: ffffffff811aa562 r11: b6ff8f8d9e9c0000 r12: ffffffff811aa562
r13: 0000000000000000 r14: 0000000000000000 r15: ffffffff80ed5e60
trap number             = 12
panic: page fault
cpuid = 2
time = 1
Uptime: 1s
Automatic reboot in 15 seconds - press a key on the console to abort

Config is attached.
 

Attachments

The value for fault virtual address suggests a NULL pointer dereference.

If you build your own custom kernels, you should be prepared to debug them. You need to obtain a stack trace for the fault. By looking at the functions on top of the stack you might be able to figure out what's wrong.

Here is some documentation that can help you: https://docs.freebsd.org/en/books/developers-handbook/kerneldebug/

As an alternative to building your own kernel have you considered using the sysctl kern.securelevel to disable module loading just after all the modules you need get loaded?
 
Back
Top