public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Michal Schmidt <mschmidt@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/libpsm2] rawhide: Apply hardening flags to assembler code to fix annocheck failure
Date: Tue, 30 Jun 2026 10:14:35 GMT	[thread overview]
Message-ID: <178281447567.1.12581864380943188080.rpms-libpsm2-8421b657ca19@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/libpsm2
Branch : rawhide
Commit : 8421b657ca193f5d9b2ebb73c916d90579eef206
Author : Michal Schmidt <mschmidt@redhat.com>
Date   : 2026-06-30T12:13:04+02:00
Stats  : +42/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/libpsm2/c/8421b657ca193f5d9b2ebb73c916d90579eef206?branch=rawhide

Log:
Apply hardening flags to assembler code to fix annocheck failure

---
diff --git a/9000-Apply-CFLAGS-to-assembly-file-compilation.patch b/9000-Apply-CFLAGS-to-assembly-file-compilation.patch
new file mode 100644
index 0000000..be3e299
--- /dev/null
+++ b/9000-Apply-CFLAGS-to-assembly-file-compilation.patch
@@ -0,0 +1,38 @@
+From 638c3662d8951e348b831315a680b91a04168214 Mon Sep 17 00:00:00 2001
+From: Michal Schmidt <mschmidt@redhat.com>
+Date: Tue, 30 Jun 2026 10:55:22 +0200
+Subject: [PATCH] Apply CFLAGS to assembly file compilation
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The .S → .o build rule used only $(ASFLAGS), which amounted to just
+"-g3 -fpic". This meant that when building as a Fedora RPM, the
+hardening flags from %{set_build_flags} (set via CFLAGS) were not
+applied to assembly files — no annobin, no stack protector specs, etc.
+
+Add $(CFLAGS) $(BASECFLAGS) $(INCLUDES) to match the .c compilation
+rule and the .S dependency-generation rule.
+
+Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
+Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
+---
+ opa/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/opa/Makefile b/opa/Makefile
+index 2692886e07cf..a758778f8c8e 100644
+--- a/opa/Makefile
++++ b/opa/Makefile
+@@ -93,7 +93,7 @@ $(OUTDIR)/%.o: $(this_srcdir)/%.c | ${DEPS}
+ 	$(CC) $(CFLAGS) $(BASECFLAGS) $(INCLUDES) -c $< -o $@
+ 
+ $(OUTDIR)/%.o: $(this_srcdir)/%.S | ${DEPS}
+-	$(CC) $(ASFLAGS) -c $< -o $@
++	$(CC) $(CFLAGS) $(BASECFLAGS) $(INCLUDES) $(ASFLAGS) -c $< -o $@
+ 
+ clean:
+ 	@rm -f $(OUTDIR)/_revision.c
+-- 
+2.54.0
+

diff --git a/libpsm2.spec b/libpsm2.spec
index 7c08a5f..19877d6 100644
--- a/libpsm2.spec
+++ b/libpsm2.spec
@@ -51,6 +51,10 @@ Support for MPIs linked with PSM versions < 2
 0002-Fix-unaligned-heap-allocations-of-aligned-structs.patch
 0003-Fix-missing-memset-zero-caused-by-unaligned-heap-all.patch
 0004-Update-copyright-URL-branding-in-libpsm2-specfile.patch
+# Fix annocheck failure:
+# Hardened: ./usr/lib64/libpsm2.so.2.2: FAIL: cf-protection test because no .note.gnu.property section = no control flow information
+# Upstream pull request: https://github.com/cornelisnetworks/opa-psm2/pull/75
+9000-Apply-CFLAGS-to-assembly-file-compilation.patch
 
 %prep
 %autosetup -p1 -n opa-psm2-PSM2_%{version}

                 reply	other threads:[~2026-06-30 10:14 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=178281447567.1.12581864380943188080.rpms-libpsm2-8421b657ca19@fedoraproject.org \
    --to=mschmidt@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