x86/bpf: Emit call depth accounting if required
authorThomas Gleixner <tglx@linutronix.de>
Thu, 15 Sep 2022 11:11:34 +0000 (13:11 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 17 Oct 2022 14:41:18 +0000 (16:41 +0200)
commitb2e9dfe54be4d023124d588d6f03d16a9c0d2507
tree8f1e2c50ab4cd7cec00b3dff8764e2f2e6dbb035
parent396e0b8e09e86440c2119d12c2101110d3cd5bf9
x86/bpf: Emit call depth accounting if required

Ensure that calls in BPF jitted programs are emitting call depth accounting
when enabled to keep the call/return balanced. The return thunk jump is
already injected due to the earlier retbleed mitigations.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220915111148.615413406@infradead.org
arch/x86/include/asm/alternative.h
arch/x86/kernel/callthunks.c
arch/x86/net/bpf_jit_comp.c