~mpu/qbe

[Patch] Fix IBT/BTI by instrumenting function calls

Details
Message ID
<20231203162949.51504-2-me@tobhe.de>
DKIM signature
missing
Download raw message
Hi,

OpenBSD has started to strictly enforce running with BTI/IBT
where supported by the hardware.

This patch adds endbr64/bti c instructions to the function
entry points.  I have used hint #34 for bti because the
gnu assembler doesn't like bti instructions when they aren't
explicitly enabled. This is similar to the apprach taken by llvm
here:
https://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20200601/790000.html

On non-supported machines they should simply evaluate to nop.
Reply to thread Export thread (mbox)