From: "ioquatix (Samuel Williams) via ruby-core" Date: 2026-09-12T02:14:22+00:00 Subject: [ruby-core:126667] [Ruby Feature#22308] Implement SHSTK support for AMD64 coroutines. Issue #22308 has been reported by ioquatix (Samuel Williams). ---------------------------------------- Feature #22308: Implement SHSTK support for AMD64 coroutines. https://bugs.ruby-lang.org/issues/22308 * Author: ioquatix (Samuel Williams) * Status: Open * Assignee: ioquatix (Samuel Williams) ---------------------------------------- CRuby���s native AMD64 coroutine backend does not currently support Intel CET Shadow Stack (SHSTK). When SHSTK is active, coroutine transfers must switch both the regular stack pointer (SP) and shadow stack pointer (SSP). Each coroutine also requires its own shadow-stack allocation. Without this support, Fiber switching can trigger control-protection faults. Distributions currently need to build with --with-coroutine=ucontext or avoid enabling SHSTK. The ucontext backend has significant performance overhead compared with the native coroutine implementation. An implementation is being developed here: https://github.com/ruby/ruby/pull/5895 The proposed implementation: - Detects whether SHSTK is active at runtime. - Allocates and releases a shadow stack for each coroutine. - Initializes new shadow stacks with a valid return address. - Saves and restores SSP during coroutine transfers. - Advertises SHSTK support through the GNU property note. - Adds CI coverage that verifies SHSTK is genuinely active before running Fiber and continuation tests. IBT support has already been implemented separately; this issue concerns SHSTK support only. -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/