Open jcs opened 1 year ago
It says that indirect branch tracking is already on by default unless there is an opt-out linker flag, so do we actually need to do anything?
Yes, the opt-out is temporary.
OpenBSD enforces it now and Crystal has been marked as broken
I'd like to help get Crystal supported on OpenBSD, what work needs to be done in order to get IBT support? I'm not sure where to start.
@joshturge maybe check out QBE's implementation
Note that it was reverted due to tooling reasons, but I am trying to do a roll-forward since the blocker seems gone.
UPDATE: or, call linker with -z,nobtcfi
(see https://github.com/openbsd/ports/commit/71f21f5bf7fed6ec8faa947b5cda278558c0c8de)
OpenBSD now enforces indirect branch tracking (BTI on arm64, IBT on x86_64) which breaks Crystal on OpenBSD going forward.
I'm not sure whether this would all be handled by llvm and Crystal's compiler just needs to turn it on (in clang it's
-fcf-protection=branch
) or if there is assembly in Crystal that needs to be modified with the new instructions.