Skip to content

Nftables: Remove the overheads from register ops.#12800

Open
copybara-service[bot] wants to merge 1 commit intomasterfrom
test/cl888913686
Open

Nftables: Remove the overheads from register ops.#12800
copybara-service[bot] wants to merge 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 5 times, most recently from bc42af4 to da01d2f Compare March 27, 2026 20:31
 - 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: 888913686
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Issue was exported automatically

1 participant