about summary refs log tree commit diff
path: root/ports/ChangeLog.mips
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@codesourcery.com>2013-02-05 14:41:32 +0000
committerMaciej W. Rozycki <macro@codesourcery.com>2013-02-05 14:55:20 +0000
commitb82ba2f011fc4628ceece07412846d0b4d50cac2 (patch)
tree58b00169b96ca952724f0ca2e1d8c1f3969e3d17 /ports/ChangeLog.mips
parent9a0d1941d30221ed8875ebef4c080bd726740802 (diff)
downloadglibc-b82ba2f011fc4628ceece07412846d0b4d50cac2.tar.gz
glibc-b82ba2f011fc4628ceece07412846d0b4d50cac2.tar.xz
glibc-b82ba2f011fc4628ceece07412846d0b4d50cac2.zip
MIPS: Respect the legacy syscall restart convention.
That convention requires the instruction immediately preceding SYSCALL
to initialize $v0 with the syscall number.  Then if a restart triggers,
$v0 will have been clobbered by the syscall interrupted, and needs to be
reinititalized.  The kernel will decrement the PC by 4 before switching
back to the user mode so that $v0 has been reloaded before SYSCALL is
executed again.  This implies the place $v0 is loaded from must be
preserved across a syscall, e.g. an immediate, static register, stack
slot, etc.

The restriction was lifted with Linux 2.6.36 kernel release and no
special requirements are placed around the SYSCALL instruction anymore,
however we still support older kernel binaries.
Diffstat (limited to 'ports/ChangeLog.mips')
-rw-r--r--ports/ChangeLog.mips34
1 files changed, 34 insertions, 0 deletions
diff --git a/ports/ChangeLog.mips b/ports/ChangeLog.mips
index 65d420673f..c5a2cb9da2 100644
--- a/ports/ChangeLog.mips
+++ b/ports/ChangeLog.mips
@@ -1,3 +1,37 @@
+2013-02-05  Maciej W. Rozycki  <macro@codesourcery.com>
+
+	[BZ #15054]
+	* sysdeps/unix/sysv/linux/mips/mips32/sysdep.h (MOVE32):
+	New macro.
+	(INTERNAL_SYSCALL_NCS): Use it.  Rewrite to respect the syscall
+	restart convention.
+	(INTERNAL_SYSCALL): Rewrite to respect the syscall restart
+	convention.
+	(internal_syscall0, internal_syscall1): Likewise.
+	(internal_syscall2, internal_syscall3): Likewise.
+	(internal_syscall4, internal_syscall5): Likewise.
+	(internal_syscall6, internal_syscall7): Likewise.
+	* sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h (MOVE32):
+	New macro.
+	(INTERNAL_SYSCALL_NCS): Use it.  Rewrite to respect the syscall
+	restart convention.
+	(INTERNAL_SYSCALL): Rewrite to respect the syscall restart
+	convention.
+	(internal_syscall0, internal_syscall1): Likewise.
+	(internal_syscall2, internal_syscall3): Likewise.
+	(internal_syscall4, internal_syscall5): Likewise.
+	(internal_syscall6): Likewise.
+	* sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h (MOVE32):
+	New macro.
+	(INTERNAL_SYSCALL_NCS): Use it.  Rewrite to respect the syscall
+	restart convention.
+	(INTERNAL_SYSCALL): Rewrite to respect the syscall restart
+	convention.
+	(internal_syscall0, internal_syscall1): Likewise.
+	(internal_syscall2, internal_syscall3): Likewise.
+	(internal_syscall4, internal_syscall5): Likewise.
+	(internal_syscall6): Likewise.
+
 2013-02-04  Joseph Myers  <joseph@codesourcery.com>
 
 	[BZ #13550]