4 ms·
an interesting patch for Go on OpenBSD https://marc.info/?l=openbsd-ports-cvs&m=158083696719245&w=2 https://marc.info/?l=openbsd-ports-cvs&m=158083696719245&w=2
by protomyth 7y ago
an interesting patch for Go on OpenBSD https://marc.info/?l=openbsd-ports-cvs&m=158083696719245&w=2 https://marc.info/?l=openbsd-ports-cvs&m=158083696719245&w=2
Log message:
Add two no op instructions following svc for Go on openbsd/arm64.
All except some of the most recent arm64 processors have a speculative execution flaw that occurs across a syscall boundary, which cannot be mitigated in the kernel. In order to protect against this leak a speculation barrier needs to be placed after an svc instruction.
In order to avoid the performance impact of these instructions, the kernel will soon start returning execution two instructions past the svc call. For now two hardware no ops are added, which allows syscalls to work with both old and new kernels. Once the kernel is cut over the no ops can be replaced with actual speculation barriers.