diff options
| author | Paolo Abeni <pabeni@redhat.com> | 2026-11-26 11:27:13 +0100 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2026-11-26 11:27:13 +0100 |
| commit | 4ef60251fd9142ddce4b3236f3cb1ea2e4f3f1fa (patch) | |
| tree | 1b0bfa28160653aa6fbb4a853a7b39480ef7a606 /tools/perf/scripts/python | |
| parent | e509726660dd06ce107437aecf7c106c9d3fc1e7 (diff) | |
| parent | d26b244cdec331b987ae2202ef23c92ab43a8afe (diff) | |
Merge branch 'tls-don-t-hide-a-queued-keyupdate-from-poll'
Felipe Pereira Stival says:
====================
tls: don't hide a queued KeyUpdate from poll()
A kTLS reader that waits for a read event before each recv() can stall
after the peer sends a TLS 1.3 KeyUpdate. I ran into this while testing
a kTLS patch for Erlang/OTP.
Erlang does one recv() per read event, with level-triggered epoll.
When application data is followed by a KeyUpdate, one recv() can
decrypt both records, return the data without an error, and leave the
KeyUpdate queued. Because a rekey is now pending, poll() no longer
reports the socket as readable. Without another read event, the reader
never calls recv() again, never sees the -EIO for the KeyUpdate, and
never provides the new key.
Patch 1 keeps the socket readable until the reader has consumed the
KeyUpdate. As before, poll() doesn't report records after the
KeyUpdate until userspace provides the new key. Patch 2 adds a
selftest, which fails without patch 1.
I worked on this with an AI coding assistant (Claude). It wrote the
first drafts of the code and the commit messages, and I reviewed and
reworked them. I directed the whole process, from tracing the missing
read event to tls_sk_poll() to checking how other kinds of readers
are affected and testing in QEMU/KVM.
Signed-off-by: Felipe Pereira Stival <v0idpwn@gmail.com>
====================
Link: https://patch.msgid.link/20261118-v0idpwn-tls-poll-parked-keyupdate-v1-0-8e25101e7be6@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
