Kernel+LibC+UserspaceEmulator: Mostly add recvmsg(), sendmsg()

The implementation only supports a single iovec for now.
Some might say having more than one iovec is the main point of
recvmsg() and sendmsg(), but I'm interested in the control message
bits.
This commit is contained in:
Nico Weber 2020-09-16 11:45:00 -04:00 committed by Andreas Kling
commit b36a2d6686
Notes: sideshowbarker 2024-07-19 02:21:56 +09:00
9 changed files with 158 additions and 79 deletions

View file

@ -76,6 +76,12 @@ template<typename T>
return copy_from_user(dest, src.unsafe_userspace_ptr(), sizeof(T));
}
template<typename T>
[[nodiscard]] inline bool copy_from_user(T* dest, Userspace<T*> src)
{
return copy_from_user(dest, src.unsafe_userspace_ptr(), sizeof(T));
}
template<typename T>
[[nodiscard]] inline bool copy_to_user(Userspace<T*> dest, const T* src)
{