public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Arjun Shankar <arjun@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/ruby] rawhide: x86_64: Use ucontext based coroutines for CET compatibility
Date: Fri, 11 Sep 2026 08:45:54 GMT	[thread overview]
Message-ID: <178911635468.1.2445498207655126.rpms-ruby-2457d5a3a501@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/ruby
            Branch : rawhide
            Commit : 2457d5a3a501e0ed428133d912a09c88cb3e6568
            Author : Arjun Shankar <arjun@redhat.com>
            Date   : 2026-09-10T19:11:51+02:00
            Stats  : +7/-1 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/ruby/c/2457d5a3a501e0ed428133d912a09c88cb3e6568?branch=rawhide

            Log:
            x86_64: Use ucontext based coroutines for CET compatibility

Ruby's x86_64 coroutine implementation uses hand-written assembly
(coroutine/amd64/Context.S) that is incompatible with Shadow Stack
support [1].  Therefore, switch to the ucontext coroutine backend which
delegates context switching to glibc's swapcontext().

[1] https://fedoraproject.org/wiki/Changes/ShadowStack

---
diff --git a/ruby.spec b/ruby.spec
index a2b36e1..e1b2c85 100644
--- a/ruby.spec
+++ b/ruby.spec
@@ -189,7 +189,7 @@
 Summary: An interpreter of object-oriented scripting language
 Name: ruby
 Version: %{ruby_version}%{?development_release}
-Release: 38%{?dist}
+Release: 39%{?dist}
 # Licenses, which are likely not included in binary RPMs:
 # Apache-2.0:
 #   benchmark/gc/redblack.rb
@@ -845,6 +845,9 @@ pushd %{_vpath_builddir}
         --enable-shared \
         --with-ruby-version='' \
         --enable-multiarch \
+%ifarch x86_64
+        --with-coroutine=ucontext \
+%endif
         %{?with_yjit: --enable-yjit} \
         %{?with_zjit: --enable-zjit} \
         %{?with_rust: rustc_flags='%{build_rustflags}'} \
@@ -1952,6 +1955,9 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \
 
 
 %changelog
+* Thu Sep 10 2026 Arjun Shankar <arjun@redhat.com> - 4.0.6-39
+- x86_64: Use ucontext based coroutines for CET compatibility
+
 * Thu Sep 03 2026 Mamoru TASAKA <mtasaka@fedoraproject.org> - 4.0.6-38
 - Backport upstream patch to update resolv to 0.7.2
 - Resolves: CVE-2026-80212 (rhbz#2527308)

                 reply	other threads:[~2026-09-11  8:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178911635468.1.2445498207655126.rpms-ruby-2457d5a3a501@fedoraproject.org \
    --to=arjun@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox