HomeFreeBSD

ktls: Don't mark existing received mbufs notready for TOE TLS.

Description

ktls: Don't mark existing received mbufs notready for TOE TLS.

The TOE driver might receive decrypted TLS records that are enqueued
to the socket buffer after ktls_try_toe() returns and before
ktls_enable_rx() locks the receive buffer to call sb_mark_notready().
In that case, sb_mark_notready() would incorrectly treat the decrypted
TLS record as an encrypted record and schedule it for decryption.
This always resulted in the connection being dropped as the data in
the control message did not look like a valid TLS header.

To fix, don't try to handle software decryption of existing buffers in
the socket buffer for TOE TLS in ktls_enable_rx(). If a TOE TLS
driver needs to decrypt existing data in the socket buffer, the driver
will need to manage that in its tod_alloc_tls_session method.

Sponsored by: Chelsio Communications

(cherry picked from commit faf0224ff27b93b743d50b3830bf5ce345b67e94)

Details

Provenance
jhbAuthored on Jun 15 2021, 5:36 PM
Parents
rGfb886a18a0eb: kdb: Handle process enumeration before procinit()
Branches
Unknown
Tags
Unknown