summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_output.c
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2016-04-18 05:59:50 +0000
committerdlg <dlg@openbsd.org>2016-04-18 05:59:50 +0000
commit69136b8e5b2c3345d6e6a11111be6f877e8a0469 (patch)
tree99780f6a784004d85dc7971bb306fa35bac72779 /sys/netinet/ip_output.c
parentall archs support shared libs; from bob nw8l (diff)
downloadwireguard-openbsd-69136b8e5b2c3345d6e6a11111be6f877e8a0469.tar.xz
wireguard-openbsd-69136b8e5b2c3345d6e6a11111be6f877e8a0469.zip
allocate an array of entries, not pointers for the queues
this solves my memory corruption problem with a samsung sm951 in a particular slot on a dell 2950. hilariously, i had picked values which masked this problem on sparc64. i randomly picked 128 as the number of entries on the queues, and dmamem allocs get rounded up to PAGE_SIZE. on amd64 and sparc64 this meant i was asking for 128 * 8 (sizeof pointer), or 1024 bytes, which got rounded up to 4096 and 8192 on each arch respectively. 128 * 64 (the size of a submission queue entry) is 8192, so it worked fine on sparc64 for that reason, but randomly blows up on amd64. the 2950 above allocated mbufs out of the page after the submission queue, which i ended over overwriting. anyway. let's move on.
Diffstat (limited to 'sys/netinet/ip_output.c')
0 files changed, 0 insertions, 0 deletions