summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authormikeb <mikeb@openbsd.org>2016-10-06 17:00:25 +0000
committermikeb <mikeb@openbsd.org>2016-10-06 17:00:25 +0000
commit4c16a85a086261679b76ea729f8e86d5a0b38c8f (patch)
tree4ede2a046d6e1aa86be31ed57929f965da0af8f7 /sys/kern
parentThe start control imsg has been switched to a new "struct (diff)
downloadwireguard-openbsd-4c16a85a086261679b76ea729f8e86d5a0b38c8f.tar.xz
wireguard-openbsd-4c16a85a086261679b76ea729f8e86d5a0b38c8f.zip
Remove _ds_boundary abuse (again)
The logic behind this change is this: a single mbuf may reference only a contiguous chunk of memory. When this chunk crosses a page boundary only the first part of it has a non-zero offset while all other chunks start at the beginning of the page. We take advantage of this fact and calculate the offset of a first chunk as a simple "mtod(m, vaddr_t) & PAGE_MASK".
Diffstat (limited to 'sys/kern')
0 files changed, 0 insertions, 0 deletions