Skip to content
Commit 58912710 authored by Peter Zijlstra's avatar Peter Zijlstra
Browse files

x86/ibt,bpf: Add ENDBR instructions to prologue and trampoline



With IBT enabled builds we need ENDBR instructions at indirect jump
target sites, since we start execution of the JIT'ed code through an
indirect jump, the very first instruction needs to be ENDBR.

Similarly, since eBPF tail-calls use indirect branches, their landing
site needs to be an ENDBR too.

The trampolines need similar adjustment.

Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Fixed-by: default avatarKumar Kartikeya Dwivedi <memxor@gmail.com>
Acked-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
Link: https://lore.kernel.org/r/20220308154318.464998838@infradead.org
parent cc66bb91
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment