]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
tcp: change bpf_skops_hdr_opt_len() signature
authorEric Dumazet <edumazet@google.com>
Mon, 1 Jun 2026 09:38:19 +0000 (09:38 +0000)
committerJakub Kicinski <kuba@kernel.org>
Tue, 2 Jun 2026 18:14:59 +0000 (11:14 -0700)
commitceac8dbce6c30f1eda0534b7dea91bfb4d050145
tree5f031545d741b67cbc0da64cb75732473a307db0
parentc0b3005e32ce78e6cef53a61216fedfb268762bc
tcp: change bpf_skops_hdr_opt_len() signature

Some compilers do not inline bpf_skops_hdr_opt_len() from
tcp_established_options(), forcing an expensive stack canary
when CONFIG_STACKPROTECTOR_STRONG=y.

Change bpf_skops_hdr_opt_len() to return @remaining by value
to remove this stack canary from TCP fast path.

$ scripts/bloat-o-meter -t vmlinux.old vmlinux.new
add/remove: 0/0 grow/shrink: 1/1 up/down: 10/-59 (-49)
Function                                     old     new   delta
bpf_skops_hdr_opt_len                        297     307     +10
tcp_established_options                      574     515     -59
Total: Before=31456795, After=31456746, chg -0.00%

Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20260601093819.469626-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/tcp_output.c