-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Wanted Coccinelle scripts #11257
Copy link
Copy link
Open
Labels
area/CIContinuous Integration testing issue or flakeContinuous Integration testing issue or flakearea/datapathImpacts bpf/ or low-level forwarding details, including map management and monitor messages.Impacts bpf/ or low-level forwarding details, including map management and monitor messages.pinnedThese issues are not marked stale by our issue bot.These issues are not marked stale by our issue bot.
Metadata
Metadata
Assignees
Labels
area/CIContinuous Integration testing issue or flakeContinuous Integration testing issue or flakearea/datapathImpacts bpf/ or low-level forwarding details, including map management and monitor messages.Impacts bpf/ or low-level forwarding details, including map management and monitor messages.pinnedThese issues are not marked stale by our issue bot.These issues are not marked stale by our issue bot.
We are using a couple Coccinelle scripts for the BPF code. Linux has a lot more, some of which may be useful in the context of Cilium.
This issue lists both scripts from Linux that might be useful and other specific things we'd like to detect and/or patch with Coccinelle in our BPF code. Feel free to add items!
ARRAY_SIZEcan be used.ep_tail_call()calls are followed byreturn DROP_MISSED_TAIL_CALL. cocci: Detect unlogged missed tail calls #11808return DROP_CT_CREATE_FAILEDare preceded bysend_signal_ct_fill_up().cilium_dbg_capture().ct_state->backend_idare appropriately guarded.identity_is_remote_nodeandidentity_is_nodewhenever possible. (from Support policy matching against kube-apiserver #17823). cocci: New test to find missingidentity_is_{remote_,}node#18385send_trace_notifyargument is of correct type. (from hubble: Fix misclassification ofto-networkreply packets #18196 (comment)).If you'd like to detect some specific and problematic code pattern, but are unsure whether Coccinelle is able, please post below to discuss it.