Project

General

Profile

« Previous | Next » 

Revision a60831f9

Added by jeremyevans (Jeremy Evans) about 1 year ago

Use ENDBR instruction in amd64 coroutine on OpenBSD

When running on newer Intel processors supporting the feature,
OpenBSD enforces indirect branch tracking. Without this endbr64
instruction, jumps to the coroutine_transfer function result
in SIGILL on OpenBSD/amd64 when using such processors.

The OpenBSD Ruby ports have been using a patch similar to this
for the past two months.

From some research, cet.h has been supported by GCC for about
6 years and LLVM for about 4 years.