Documentation: no parallel socket operations on AF_KTLS and bound socket are possible without explicit synchronization
Closed this issue · 3 comments
fridex commented
Bound UDP/TCP sockets should be locked while we are doing operations in AF_KTLS since (not only) userspace can operate on them in parallel with AF_KTLS and that could lead to inconstancy; pseudocode:
in AF_KTLS: userspace:
read(sd, ktls_buf, size, MSG_PEEK)
decrypt !!! read(sd, buf2, size, 0)
!!! pop_record(sd)
fridex commented
fridex commented
Since socket locking is done inside socket operations (bound socket), we cannot lock it in AF_KTLS. Synchronization has to be done explicitly in user space if necessary. So this should be considered as "not a bug", but this should be explicitly stated in documentation (no parallel socket operations on AF_KTLS and bound socket are possible without explicit synchronization).
djwatson commented
Not a bug. Closing