|author||Rich Felker <email@example.com>||2019-12-17 23:00:24 -0500|
|committer||Rich Felker <firstname.lastname@example.org>||2019-12-17 23:00:24 -0500|
hook recvmmsg up to SO_TIMESTAMP[NS] fallback for pre-time64 kernels
always try the time64 syscall first since we can use its success to conclude that no conversion is needed (any setsockopt for the timestamp options would have succeeded without need for fallbacks). otherwise, we have to remember the original controllen for each msghdr, requiring O(vlen) space, so vlen must be bounded. linux clamps it to IOV_MAX for sendmmsg only (not recvmmsg), but doing the same for recvmmsg is not unreasonable, especially since the limitation will only apply to old kernels. we could optimize to avoid trying SYS_recvmmsg_time64 first if all msghdrs have controllen zero, or support unlimited vlen by looping and emulating the timeout logic, but I'm not inclined to do complex and error-prone optimizations on a function that has so many underlying problems it should really never be used.
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions