Resume HTTP/2 traceparent scan after invalid candidate#2519
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2519 +/- ##
==========================================
- Coverage 69.24% 69.12% -0.13%
==========================================
Files 345 345
Lines 46747 46795 +48
==========================================
- Hits 32372 32348 -24
- Misses 12330 12413 +83
+ Partials 2045 2034 -11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This comment was marked as resolved.
This comment was marked as resolved.
Scan retries now shift the HPACK pull window instead of teaching the candidate finder to skip a saved offset inside its 192-byte loop. That keeps packet reads at fixed loop offsets and avoids the verifier state explosion seen on arm64. Validate candidates from a pulled candidate window as well, preserving the malformed traceparent retry behavior while removing another scalar-target walk.
Clarify that h2_tp_candidate_pos carries either the next HPACK retry scan start or the found candidate offset that validation should use. The old wording only described the scan side of the state.
|
@rafaelroquetto please take a look at this one. I think this should address the issue, but not sure if my workaround the verifier limitations is optimal. |
grcevski
left a comment
There was a problem hiding this comment.
LGTM! This looks great!
I originally thought that finding invalid TP when we see 'traceparent' would be very rare and questionable on what we should do, I realised though that this infrastructure you added will help us what we want to do next, find traceparents when they are hpack encoded. In those situations, we will likely need to loop further with failed validation. So I think this is pretty cool.
Motivation
traceparentbut had an invalid value, OBI created and injected a new traceparent instead of continuing to a later valid one.Description
HEADERSframe.k_h2_tp_hpack_sizefor plaintraceparentnames.k_h2_tp_hpack_huffman_sizefor Huffman-encodedtraceparentnames.Testing
clang-format --dry-run --Werror bpf/tpinjector/tpinjector.cmake generate