summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/serverloop.c
diff options
context:
space:
mode:
authormikeb <mikeb@openbsd.org>2016-12-13 19:02:39 +0000
committermikeb <mikeb@openbsd.org>2016-12-13 19:02:39 +0000
commit2bb8be5d6141f01521e8f90ca8bad43f489b1f1b (patch)
tree23c06fcb38ccc1ef313b315c01928d9402b6764c /usr.bin/ssh/serverloop.c
parentPoll until the ITSDONE flag is set on the transfer (diff)
downloadwireguard-openbsd-2bb8be5d6141f01521e8f90ca8bad43f489b1f1b.tar.xz
wireguard-openbsd-2bb8be5d6141f01521e8f90ca8bad43f489b1f1b.zip
Bounce unaligned transfer data through a scratch buffer
Thanks to the detailed report from Nathanael Rensen, the issue with unaligned transfer data became apparent: the backend expects buffers be multiple of 512 bytes and to be 512 byte aligned, which is not always satisfied. This isn't an issue when requests are coming from the buffer cache, but can happen with raw device access since physio(9) ensures the former requirement is met by disallowing non-block sized reads, but doesn't enforce the latter. It remaps userland buffers into the kernel virtual space which preserves the data offset within the memory page and thus the original alignment. Buffers with offsets under the block size can't be referenced by Blkfront ring descriptors that measure data in blocks and must be substituted with temporary buffers for the duration of the I/O operation.
Diffstat (limited to 'usr.bin/ssh/serverloop.c')
0 files changed, 0 insertions, 0 deletions