History log of /haiku/headers/private/kernel/util/iovec_support.h
Revision Date Author Comments
# 55a46882 30-May-2023 Augustin Cavalier <waddlesplash@gmail.com>

USB: Support physical-vector bulk requests.

Introduce a new utility method, "generic_memcpy", which takes
generic_addr_t plus indications of whether these specify virtual or
physical addresses (and potentially user addresess) and calls the
appropriate memcpy variant depending.

All bus drivers adjusted to support this at once. We don't actually
take advantage of the physical addresses in any way (yet), as USB
controllers have some pretty specific requirements that would have
to be carefully validated to use these directly.

All bus drivers tested and confirmed to still be working.

Change-Id: I66326667e148091147bb2b3d0843a26fb7e5bda6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6479
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 65cdc13e 29-May-2023 Augustin Cavalier <waddlesplash@gmail.com>

kernel: Migrate struct generic_io_vec to a private header outside src/.

This way it is more easily accessed from drivers outside the kernel,
which it soon will be, without having to add an explicit UseHeaders.
(The drivers that use it already all use the IOScheduler.)

No functional change.

Change-Id: Ibc2d2678e37d9d7ab73391cb17b72cca86f92132
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6477
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 013719cf 11-Aug-2022 Jérôme Duval <jerome.duval@gmail.com>

kernel: get_iovecs_from_user(): checks total iovec length against SSIZE_MAX

* the return type for recvmsg(), sendmsg(), readv(), writev() is ssize_t.
* check required by POSIX.
* fix memory leaks on failure introduced in 00f1e7c5e40b41f892625b720c6a032b20f0c405

Change-Id: Ibf74ae2035b7e9c7a3db3613f60e06672ded4db0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5542
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 00f1e7c5 03-Jun-2022 Augustin Cavalier <waddlesplash@gmail.com>

kernel: Rework iovec copying from userland.

Create a utility function which performs all necessary checks,
allocates memory, and copies the structures, and then make use of it
in the three places in the kernel which did all this manually.

None of them were previously complete: the fd and socket code only
checked iov_base and not iov_len, while the port code did not check
anything at all.

Part of #14961.