[llvm] [X86] Add support for indirect branch tracking in jump tables (PR #77679)

Nicholas Mosier via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 14 08:18:37 PST 2024


nmosier wrote:

Yeah, we could do the same for X86. But I think having two modes, one per threat model, is desireable, since adding ENDBRANCH instructions to each jump table block can be very expensive (e.g., it can double the jump table code size if each block originally only has 1–2 instructions). That way, code that doesn't care about Spectre et al. can forgo jump table protections without suffering any (modest) performance impact.

I'm open to either option, though. The project I'm working on right now requires IBT protection for all indirect branches, anyway, so having a single mode that unconditionally protects indirect jump table branches works just as well.

https://github.com/llvm/llvm-project/pull/77679


More information about the llvm-commits mailing list