Skip to content

gotc: flower filter writes and chain templates (increment 24) - #379

Merged
randomizedcoder merged 4 commits into
mainfrom
gotc/flowerwrite
Dec 3, 2026
Merged

randomizedcoder merged 4 commits into
mainfrom
gotc/flowerwrite

Conversation

@randomizedcoder

Copy link
Copy Markdown
Owner

Increment 24: gotc now clones tc filter … flower writes and tc chain add … flower templates. That was the last tc write kind gotc refused by name, so every tc 7.2.0 write that needs no bpf(2) is now cloned.

Commits

  • 24C (V069) nlcap: the tcflowerwrite capture space, 262 rows (every keyword and form, a row per lead W321–W410 and per kernel note K90–K112, bounds, and batches).
  • 24W (V070) gotc: flower writes behind gotc_write (fw_flower*.go). ct and tunnel_key share their option parsers with it, and TcaClsFlagsVerbose is added to pkg/xtcpnl.
  • 24B (DOC017) docs(upstream):
    • iproute2-tc-flower-write.md, with an entry per lead and a gotc column;
    • 43 "Extended in increment 24" lines;
    • a HEAD check;
    • gotc.md now has a Writes section.
  • 24L (V071) live diff on the workbench.

Results

  • Corpus: 249 of 262 tcflowerwrite rows replay byte for byte. 13 are refused by name, rc 255, with nothing sent:
    • W370, W372: MACs where tc sends uninitialised stack bytes or does an undefined shift;
    • W383–W387: option values that make tc abort, segfault or overflow its 4096-byte buffers;
    • W397: an all-ones pfcp SEID after a failed batch line (tc's stale errno).
  • Earlier refusals now matched: tcfwrite ec-116 and both tdc flower rows. tdcFilterSkips is now empty, and tdcFilterWritesSent is 295.
  • Live diff: 252 of 265 rows are identical between tc 7.2.0 and gotc, and the other 13 are the named refusals. tc matched the corpus on every row, so the K notes held on a second boot.
  • Tests:
    • TestGotcFlowerWrite: 110 rows;
    • fuzzing found nothing: FuzzFlowerEncOpts about 900k runs, FuzzGotcFilterWrite 994k;
    • 10/10 mutants killed;
    • internal/gotc coverage 86.9%.
  • Upstream as of today:
    • f_flower.c has no commit since v7.2.0, so every lead stands.
    • ll_addr's 5faf18f672c1 fixes W374 and removes W406's MAC NULs; W370 still stands.
    • The W182 fix SHA is corrected to 55c024f3475a, because the mirror's main was rewritten.
    • Nothing was sent to netdev.

Gates (at ab88397)

  • go test ./...: pass
  • test-go-race: pass
  • lint-baseline (tiers 0-2): pass
  • no-write-encoders: pass

The first go test and race runs failed on TestSockstatReader (pkg/xtcp) and TestStartMetrics (cmd/zstd-probe). This branch touches neither package, both pass on their own, and the rerun passed.

🤖 Generated with Claude Code

randomizedcoder and others added 4 commits December 2, 2026 17:15
262 rows over f_flower.c's parse side: every keyword and form, the verb
grid with chain templates, a row per lead W321-W410 and the kernel notes,
the (R) crash rows with tc's own answer, the size boundaries and five
batch shapes. Two batches on one boot agree apart from W370's stack bytes.

W406's batches move line 2's sdata word with leading spaces so its
32-byte copy covers flower's NULs; the four rows were recaptured twice.

The new docs/netlink/upstream/iproute2-tc-flower-write.md records each
lead's outcome, six corrected predictions, K90-K112 (K103 dropped as
unreachable through tc) and five bug-class candidates. Not submitted
to netdev.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port f_flower.c's parse side (iproute2 v7.2.0) behind gotc_write:
the keyword chain in tc's order with its strcmp/matches() split, the
L2, L3/L4, enc and ct keys, the five enc option wrappers, and
parse_done's emission order. flower joins foptParsers, which chain
templates reach through the same filterModify, so gotc now refuses no
tc write kind by name.

All 262 tcflowerwrite rows replay byte for byte, apart from 13 refused
by name: W370/W372 (stack bytes, UB shift), W383-W387 (tc aborts,
segfaults or overflows its 4096-byte option buffers) and W397 (an
all-ones pfcp SEID after a failed batch line, where tc reads a stale
errno). tcfwrite ec-116 and both tdc flower rows are now sent.

m_ct.c's mark and label parsers and getAddr1's any/all now serve flower
too; xtcpnl gains TCA_CLS_FLAGS_VERBOSE. TestGotcFlowerWrite (110
rows), FuzzFlowerEncOpts, seven flower fuzz seeds and 10 killed mutants.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…4B, DOC017)

iproute2-tc-flower-write.md gains one generated entry per lead
W321-W410 (each pinning row's command, tc's rc, stderr and what became
of the request), the 24W/24B status and the HEAD check: f_flower.c is
unchanged at the mirror's d7e038f99479, so every lead stands; ll_addr's
rewrite refuses W374's MACs and drops W406's MAC NULs; the kernel has
no commit after v7.4-rc4 in the cited files. W402's table row now
escapes its '|'.

43 "Extended in increment 24" lines go into the flower, filter-write
and action-write docs. The mirror's main was rewritten after 23B, so
the W182 fix is now cited as 55c024f3475a (was c4d6334c55aa), and the
23B check records cf4eec518462's addattr_l padding fix. gotc.md gains a
Writes section. Not submitted to netdev.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tc 7.2.0 and the gotc_write build ran all 262 tcflowerwrite rows,
tcfwrite ec-116 and tdc's ct/3992 and pedit/1a4f: 252 of 265 identical
(23 where only tc hears the kernel), the other 13 the refusals by name.
tc matched the corpus on every row, so K90-K112 recurred on a second
boot. The VM was left as found and powered off.

Also corrects the 24W status to 13 refused rows (it said 14).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@randomizedcoder
randomizedcoder merged commit 8eafe45 into main Dec 3, 2026
1 check passed
randomizedcoder added a commit that referenced this pull request Dec 3, 2026
PR #379 (gotc/flowerwrite) added iproute2-tc-flower-write.md but not its
upstream index row; CI runs only the lint ratchet, so the gap landed red on
the docs check - the same shape as 8b707c8's two gaps and 4151689's
third, found this time by the post-merge gate battery rather than review.

🤖 Generated with [pi](https://github.com/badlogic/pi-mono)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant