netfilter: nf_tables: add static key to skip retpoline workarounds
authorFlorian Westphal <fw@strlen.de>
Tue, 3 Jan 2023 12:47:15 +0000 (13:47 +0100)
committerFlorian Westphal <fw@strlen.de>
Wed, 18 Jan 2023 12:05:25 +0000 (13:05 +0100)
commitd8d76062785548167cbc01eb5aaae2ae0665b5da
tree8c5e07d81e9163e50d801361e4cd79d486caf281
parent9db5d918e2c07fa09fab18bc7addf3408da0c76f
netfilter: nf_tables: add static key to skip retpoline workarounds

If CONFIG_RETPOLINE is enabled nf_tables avoids indirect calls for
builtin expressions.

On newer cpus indirect calls do not go through the retpoline thunk
anymore, even for RETPOLINE=y builds.

Just like with the new tc retpoline wrappers:
Add a static key to skip the if / else if cascade if the cpu
does not require retpolines.

Suggested-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
net/netfilter/nf_tables_core.c