Page MenuHomeFreeBSD

ktls: Fix accounting for TLS 1.0 empty fragments.
ClosedPublic

Authored by jhb on Aug 13 2021, 11:13 PM.
Tags
None
Referenced Files
F107352076: D31536.diff
Sun, Jan 12, 10:05 PM
Unknown Object (File)
Nov 11 2024, 11:17 PM
Unknown Object (File)
Nov 11 2024, 10:38 PM
Unknown Object (File)
Nov 6 2024, 4:54 AM
Unknown Object (File)
Oct 24 2024, 8:47 AM
Unknown Object (File)
Oct 20 2024, 11:45 AM
Unknown Object (File)
Sep 30 2024, 11:25 PM
Unknown Object (File)
Sep 26 2024, 2:53 PM
Subscribers

Details

Summary

TLS 1.0 empty fragment mbufs have no payload and thus m_epg_npgs is
zero. However, these mbufs need to occupy a "unit" of space for the
purposes of M_NOTREADY tracking similar to regular mbufs. Previously
this was done for the page count returned from ktls_frame() and passed
to ktls_enqueue() as well as the page count passed to pru_ready().

However, sbready() and mb_free_notready() only use m_epg_nrdy to
determine the number of "units" of space in an M_EXT mbuf, so when a
TLS 1.0 fragment was marked ready it would mark one unit of the next
mbuf in the socket buffer as ready as well. To fix, set m_epg_nrdy to
1 for empty fragments. This actually simplifies the code as now only
ktls_frame() has to handle TLS 1.0 fragments explicitly and the rest
of the KTLS functions can just use m_epg_nrdy.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 41035
Build 37924: arc lint + arc unit