From 81697eebee566e2ea337d310daaffd3bfc7e952c Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Tue, 27 Oct 2020 21:17:09 +0100 Subject: [PATCH] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/libpsm2.git#d27398a782262a1da5b9c019038c8275f57ca855 --- libpsm2-gcc11.patch | 26 ++++++++++++++++++++++++++ libpsm2.spec | 7 ++++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 libpsm2-gcc11.patch diff --git a/libpsm2-gcc11.patch b/libpsm2-gcc11.patch new file mode 100644 index 0000000..285046d --- /dev/null +++ b/libpsm2-gcc11.patch @@ -0,0 +1,26 @@ +diff -Nrup a/include/linux-i386/sysdep.h b/include/linux-i386/sysdep.h +--- a/include/linux-i386/sysdep.h 2019-10-03 20:00:29.000000000 -0600 ++++ b/include/linux-i386/sysdep.h 2020-10-19 16:10:45.680585173 -0600 +@@ -139,12 +139,18 @@ static __inline__ uint32_t ips_cmpxchg(v + uint32_t old_val, uint32_t new_val) + { + uint32_t prev; +- struct xchg_dummy { +- uint32_t a[100]; +- }; + ++ /* This code used to cast PTR to a type which was an array of 100 ++ uint32_t objects. That makes no sense as the cmpxchgl's side ++ effect can be covered by an single int. ++ ++ The semantics of GCC's ASMs for memory is that it clobbers the ++ whole pointed-to object. Thus analyzers saw a 100 uint32_t sized ++ store which triggers diagnostics for out of bounds array writes. ++ ++ The cast to the dummy type has been removed. */ + asm volatile (LOCK_PREFIX "cmpxchgl %1,%2" : "=a"(prev) +- : "q"(new_val), "m"(*(struct xchg_dummy *)ptr), "0"(old_val) ++ : "q"(new_val), "m"(*ptr), "0"(old_val) + : "memory"); + + return prev; diff --git a/libpsm2.spec b/libpsm2.spec index fa46426..7dcc341 100644 --- a/libpsm2.spec +++ b/libpsm2.spec @@ -53,7 +53,7 @@ Summary: Intel PSM Libraries Name: libpsm2 Version: 11.2.86 -Release: 6%{?dist} +Release: 7%{?dist} License: BSD or GPLv2 URL: https://github.com/01org/opa-psm2/ @@ -65,6 +65,7 @@ URL: https://github.com/01org/opa-psm2/ Source0: %{name}-%{version}.tar.gz Patch0: 0001-Fix-multiple-definition-issues.patch Patch1: makefile-distro-from-environment.patch +Patch2: %{name}-gcc11.patch # The OPA product is supported on x86 64 only: ExclusiveArch: x86_64 @@ -105,6 +106,7 @@ Support for MPIs linked with PSM versions < 2 %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 %build %{set_build_flags} @@ -150,6 +152,9 @@ rm -f %{buildroot}%{_libdir}/*.a %endif %changelog +* Mon Oct 19 2020 Jeff Law - 11.2.86-7 +- Avoid out of bounds array index diagnostic with gcc-11 + * Tue Jul 28 2020 Fedora Release Engineering - 11.2.86-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild