fehmi noyan isi <> changed:

           What    |Removed                     |Added
 Attachment #190429|0                           |1
        is obsolete|                            |

--- Comment #28 from fehmi noyan isi <> ---
Created attachment 190574
patch with mallocarray(9), printf(9) and a single fallback block

Attached is the latest patch with a single fallback block which is executed
depending on the return values from mallcoarray(... | M_NOWAIT) calls. The code
sets the value of respective variable that is passed to mallocarray(9) rather
than directly using PH_HASHSIZ in the mallocarray(9) call.

I tried the patch on a 512MB VM running FreeBSD-12.0CURRENT and verified that
PF initialisation went okay. A log message indicating the memory allocation
issue is present in /var/log/messages (and in the console).

root@test-vm:~ # uname -a

FreeBSD test-vm 12.0-CURRENT FreeBSD 12.0-CURRENT #13: Wed Feb 14 13:28:52 NZDT
2018     root@test-vm:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  amd64
root@test-vm:~ # cat /boot/loader.conf"2147483648"
root@test-vm:~ # sysctl hw.realmem
hw.realmem: 536805376
root@test-vm:~ # kldstat
Id Refs Address            Size     Name
 1    1 0xffffffff80200000 20bf2d0  kernel
root@test-vm:~ # service pf onestart
Enabling pf.
root@test-vm:~ # kldstat
Id Refs Address            Size     Name
 1    3 0xffffffff80200000 20bf2d0  kernel
 2    1 0xffffffff82419000 33590    pf.ko
root@test-vm:~ # grep pf_initialize /var/log/messages
Feb 14 13:40:20 test-vm kernel: pf_initialize : Not enough memory for
85899345920 bytes.

You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________ mailing list
To unsubscribe, send any mail to ""

Reply via email to