diff --git a/glibc-upstream-2.33-41.patch b/glibc-upstream-2.33-41.patch new file mode 100644 index 0000000..e185b3b --- /dev/null +++ b/glibc-upstream-2.33-41.patch @@ -0,0 +1,32 @@ +commit 0ef0e6de7fdfa18328b09ba2afb4f0112d4bdab4 +Author: Nicholas Piggin +Date: Thu May 20 11:00:36 2021 -0300 + + powerpc: Fix handling of scv return error codes [BZ #27892] + + When using scv for templated ASM syscalls, current code interprets any + negative return value as error, but the only valid error codes are in + the range -4095..-1 according to the ABI. + + This commit also fixes 'signal.gen.test' strace test, where the issue + was first identified. + + Reviewed-by: Matheus Castanho + (cherry picked from commit 7de36744ee1325f35d3fe0ca079dd33c40b12267) + +diff --git a/sysdeps/powerpc/powerpc64/sysdep.h b/sysdeps/powerpc/powerpc64/sysdep.h +index c57bb1c05d02f663..1ea4c3b917295168 100644 +--- a/sysdeps/powerpc/powerpc64/sysdep.h ++++ b/sysdeps/powerpc/powerpc64/sysdep.h +@@ -398,8 +398,9 @@ LT_LABELSUFFIX(name,_name_end): ; \ + #endif + + #define RET_SCV \ +- cmpdi r3,0; \ +- bgelr+; \ ++ li r9,-4095; \ ++ cmpld r3,r9; \ ++ bltlr+; \ + neg r3,r3; + + #define RET_SC \ diff --git a/glibc.spec b/glibc.spec index 937bd8b..e05fcee 100644 --- a/glibc.spec +++ b/glibc.spec @@ -89,7 +89,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 13%{?dist} +Release: 14%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -206,6 +206,7 @@ Patch71: glibc-upstream-2.33-40.patch Patch72: glibc-cpu-check-1.patch Patch73: glibc-cpu-check-2.patch Patch74: glibc-cpu-check-3.patch +Patch75: glibc-upstream-2.33-41.patch ############################################################################## # Continued list of core "glibc" package information: @@ -2160,6 +2161,11 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Tue May 25 2021 Florian Weimer - 2.33-14 +- Import commit 0ef0e6de7fdfa18328b09ba2afb4f0112d4bdab4 from the + glibc 2.33 branch: +- ppc64le: scv ABI error handling fails to check IS_ERR_VALUE (#1962971) + * Fri May 21 2021 Florian Weimer - 2.33-13 - Switch back to a unified glibc-headers package for downstream (#1940686)