From: Will Newton Date: Mon, 19 May 2014 13:38:30 +0000 (+0100) Subject: AArch64: Fix handling of nocancel syscall failures X-Git-Tag: glibc-2.20~471 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a60339aaff82beadea6f580e587d64052cb5e3b8;p=thirdparty%2Fglibc.git 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/ChangeLog b/ChangeLog index 8c2fd9752e0..fc75ff2d1c0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +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. + 2014-05-20 Will Newton Yvan Roux diff --git a/sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h index f6903b5dd8c..0e9bef3afc3 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; \