From abfaca544ca62f32897d7b99c488055e56fdcbff Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: May 21 2014 19:34:20 +0000 Subject: AArch64: Fix handling of nocancel syscall failures (#1098327) --- diff --git a/glibc-aarch64-fix-handling-of-nocancel-syscall-failures.patch b/glibc-aarch64-fix-handling-of-nocancel-syscall-failures.patch new file mode 100644 index 0000000..a4fb623 --- /dev/null +++ b/glibc-aarch64-fix-handling-of-nocancel-syscall-failures.patch @@ -0,0 +1,30 @@ +commit a60339aaff82beadea6f580e587d64052cb5e3b8 +Author: Will Newton +Date: Mon May 19 14:38:30 2014 +0100 + + AArch64: Fix handling of nocancel syscall failures + + The current code for nocancel syscalls does not do a comparison of + the system call return value. This leads to code being generated + where the b.cs follows the svc instruction directly without setting + the flags on which the branch depends. + + ChangeLog: + + 2014-05-20 Will Newton + + * sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h (PSEUDO): + Test the return value of the system call in the nocancel case. + +diff --git a/sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h +index f6903b5..0e9bef3 100644 +--- a/sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h ++++ b/sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h +@@ -32,6 +32,7 @@ + __##syscall_name##_nocancel: \ + cfi_startproc; \ + DO_CALL (syscall_name, args); \ ++ cmn x0, 4095; \ + PSEUDO_RET; \ + cfi_endproc; \ + .size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \ diff --git a/glibc.spec b/glibc.spec index 39b4982..a1a5e1b 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,6 +1,6 @@ %define glibcsrcdir glibc-2.19-418-ga5d87b3 %define glibcversion 2.19.90 -%define glibcrelease 15%{?dist} +%define glibcrelease 16%{?dist} # Pre-release tarballs are pulled in from git using a command that is # effectively: # @@ -191,7 +191,7 @@ Patch0047: %{name}-nscd-sysconfig.patch # ############################################################################## -# None! +Patch1000: %{name}-aarch64-fix-handling-of-nocancel-syscall-failures.patch ############################################################################## # @@ -553,6 +553,7 @@ package or when debugging this package. %patch2031 -p1 %patch0047 -p1 %patch2032 -p1 +%patch1000 -p1 ############################################################################## # %%prep - Additional prep required... @@ -1642,6 +1643,9 @@ rm -f *.filelist* %endif %changelog +* Wed May 21 2014 Kyle McMartin - 2.19.90-16 +- AArch64: Fix handling of nocancel syscall failures (#1098327) + * Thu May 15 2014 Siddhesh Poyarekar - 2.19.90-15 - Sync with upstream master.