Skip to content

Nftables: Remove the overheads from register ops.#12800

Merged
copybara-service[bot] merged 1 commit intomasterfrom
test/cl888913686
Mar 30, 2026
Merged

Nftables: Remove the overheads from register ops.#12800
copybara-service[bot] merged 1 commit intomasterfrom
test/cl888913686

Conversation

@copybara-service
Copy link
Copy Markdown

@copybara-service copybara-service bot commented Mar 26, 2026

Nftables: Remove the overheads from register ops.

  • Shift register boundary checks from evaluate
    (hot path) to rule init (once at setup).
  • Remove registerData interfaces with concrete types to
    eliminate transient heap allocations and interface overhead
    in the evaluation hot path.
  • Fix register store validation to match Linux kernel behavior
    (net/netfilter/nf_tables_api.c:nft_validate_register_store).
    Instead of hard-limiting to 4 or 16 bytes,
    we validate against the 64-byte total array limit.
  • nft_payload: safeguard signed-unsigned overflow.

@copybara-service copybara-service bot added the exported Issue was exported automatically label Mar 26, 2026
@copybara-service copybara-service bot force-pushed the test/cl888913686 branch 6 times, most recently from da01d2f to 611ecaf Compare March 27, 2026 21:58
  - Shift register boundary checks from `evaluate`
      (hot path) to rule `init` (once at setup).
  - Remove `registerData` interfaces with concrete types to
      eliminate transient heap allocations and interface overhead
      in the evaluation hot path.
  - Fix register store validation to match Linux kernel behavior
    (net/netfilter/nf_tables_api.c:nft_validate_register_store).
    Instead of hard-limiting to 4 or 16 bytes,
    we validate against the 64-byte total array limit.
  - nft_payload: safeguard signed-unsigned overflow.

PiperOrigin-RevId: 891792589
@copybara-service copybara-service bot merged commit 7745873 into master Mar 30, 2026
@copybara-service copybara-service bot deleted the test/cl888913686 branch March 30, 2026 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Issue was exported automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant