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
This commit is contained in:
Thomas Gleixner 2022-09-15 13:11:34 +02:00 • committed by Peter Zijlstra
commit b2e9dfe54b
3 changed files with 48 additions and 9 deletions