summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/sshconnect.c
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2015-01-25 11:36:41 +0000
committerdlg <dlg@openbsd.org>2015-01-25 11:36:41 +0000
commit880ce07f8829ad9f3295ccc4fb91f82df8df89b6 (patch)
tree763a35d7435d5827c514e45882bcf7e7e939852d /usr.bin/ssh/sshconnect.c
parentImplement bus_dmamem_alloc_range(9) for macppc/socppc. (diff)
downloadwireguard-openbsd-880ce07f8829ad9f3295ccc4fb91f82df8df89b6.tar.xz
wireguard-openbsd-880ce07f8829ad9f3295ccc4fb91f82df8df89b6.zip
refactor loading of dmamaps.
bus_dmama_load and bus_dmamap_load mbuf figure out the physical addresses of the memory theyre given and then hand it to _bus_dmamap_load_paddr to store in the dmamaps sg lists. unfortunately bus_dmamap_load_mbuf assumes it is only given memory from the kernels direct mapped region, and blindly translates anything its given into phys addresses to hand to _load_paddr. i recently committed change to pool asking them to allocate large pages, which meant uvm allocated mbufs outside the direct map, which meant bus_dmamap_load_mbuf was handing out bogus physical addresses. the pool change got backed out until i could debug this. now _load and _load_mbuf now call _bus_dmamap_load_vaddr for every buffer theyve been given, which properly determines if the addresses are in the direct map or via the tlb. _load_vaddr then feeds the physical addresses into _bus_dmamap_load_paddr to store them in the dmamap. tldr; _load_mbuf doesnt make naive assumptions about its addresses now. ok miod@ kettenis@
Diffstat (limited to 'usr.bin/ssh/sshconnect.c')
0 files changed, 0 insertions, 0 deletions