* [patch] glibc 2.3: Memory clobber missing from syscalls
@ 2004-10-15 12:47 Maciej W. Rozycki
2004-10-18 1:37 ` Atsushi Nemoto
2004-10-18 5:17 ` Andreas Jaeger
0 siblings, 2 replies; 6+ messages in thread
From: Maciej W. Rozycki @ 2004-10-15 12:47 UTC (permalink / raw)
To: linux-mips
Cc: libc-alpha, Dominic Sweetman, Nigel Stephens, Maciej W. Rozycki
Hi,
It seems nobody at the libc-alpha list is intersted in this fix, so I'm
sending it here, so that people do not struggle against weird failures,
while a fix is already done. The fix is needed for the current version of
glibc.
Maciej
---------- Forwarded message ----------
Message-ID: <Pine.LNX.4.61.0410061929220.17693@perivale.mips.com>
Date: Wed, 6 Oct 2004 19:41:23 +0100 (BST)
From: Maciej W. Rozycki <macro@mips.com>
To: libc-alpha@sources.redhat.com
Cc: Dominic Sweetman <dom@mips.com>, Nigel Stephens <nigel@mips.com>,
Maciej W. Rozycki <macro@linux-mips.org>
Subject: [patch] MIPS/Linux: Memory clobber missing from syscalls
Hello,
There is a problem with all inline syscalls invoked by the library. As
"memory" is not included in the list of clobbers, more aggressive versions
of GCC, such as 3.4, may incorrectly optimize code away based on the
assumption inline syscalls do not modify memory. This indeed happens --
due to this problem the login/tst-utmp and login/tst-utmpx testcases fail.
Here is an obvious fix that works for me. Tested with the mips-linux and
mipsel-linux configurations.
2004-10-06 Maciej W. Rozycki <macro@mips.com>
* sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
(__SYSCALL_CLOBBERS): Add "memory".
* sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
(__SYSCALL_CLOBBERS): Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
(__SYSCALL_CLOBBERS): Likewise.
Please apply.
Maciej
glibc-2.3.3-mips-syscall_clobbers-0.patch
diff -up --recursive --new-file glibc-2.3.3.macro/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h glibc-2.3.3/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
--- glibc-2.3.3.macro/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h Sat Mar 29 08:15:29 2003
+++ glibc-2.3.3/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h Tue Oct 5 17:16:47 2004
@@ -275,7 +275,8 @@
_sys_result; \
})
-#define __SYSCALL_CLOBBERS "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", "$25"
+#define __SYSCALL_CLOBBERS "$1", "$3", "$8", "$9", "$10", "$11", "$12", \
+ "$13", "$14", "$15", "$24", "$25", "memory"
#endif /* __ASSEMBLER__ */
diff -up --recursive --new-file glibc-2.3.3.macro/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h glibc-2.3.3/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
--- glibc-2.3.3.macro/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h Wed Oct 1 06:59:39 2003
+++ glibc-2.3.3/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h Tue Oct 5 17:18:03 2004
@@ -235,7 +235,8 @@
_sys_result; \
})
-#define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", "$14", "$15", "$24", "$25"
+#define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", \
+ "$14", "$15", "$24", "$25", "memory"
#endif /* __ASSEMBLER__ */
#endif /* linux/mips/sysdep.h */
diff -up --recursive --new-file glibc-2.3.3.macro/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h glibc-2.3.3/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
--- glibc-2.3.3.macro/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h Wed Oct 1 06:59:40 2003
+++ glibc-2.3.3/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h Tue Oct 5 17:18:28 2004
@@ -235,7 +235,8 @@
_sys_result; \
})
-#define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", "$14", "$15", "$24", "$25"
+#define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", \
+ "$14", "$15", "$24", "$25", "memory"
#endif /* __ASSEMBLER__ */
#endif /* linux/mips/sysdep.h */
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch] glibc 2.3: Memory clobber missing from syscalls
2004-10-15 12:47 [patch] glibc 2.3: Memory clobber missing from syscalls Maciej W. Rozycki
@ 2004-10-18 1:37 ` Atsushi Nemoto
2004-10-20 3:05 ` Maciej W. Rozycki
2004-10-18 5:17 ` Andreas Jaeger
1 sibling, 1 reply; 6+ messages in thread
From: Atsushi Nemoto @ 2004-10-18 1:37 UTC (permalink / raw)
To: macro; +Cc: linux-mips, libc-alpha, dom, nigel, macro
>>>>> On Fri, 15 Oct 2004 13:47:59 +0100 (BST), "Maciej W. Rozycki" <macro@mips.com> said:
macro> It seems nobody at the libc-alpha list is intersted in this
macro> fix, so I'm sending it here, so that people do not struggle
macro> against weird failures, while a fix is already done. The fix
macro> is needed for the current version of glibc.
Then, kernel header (include/asm-mips/unistd.h) should be fixed too?
It includes some asm statements like this:
__asm__ volatile ( \
".set\tnoreorder\n\t" \
"li\t$2, %2\t\t\t# " #name "\n\t" \
"syscall\n\t" \
"move\t%0, $2\n\t" \
".set\treorder" \
: "=&r" (__v0), "=r" (__a3) \
: "i" (__NR_##name) \
: "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch] glibc 2.3: Memory clobber missing from syscalls
2004-10-15 12:47 [patch] glibc 2.3: Memory clobber missing from syscalls Maciej W. Rozycki
2004-10-18 1:37 ` Atsushi Nemoto
@ 2004-10-18 5:17 ` Andreas Jaeger
2004-10-18 16:08 ` Maciej W. Rozycki
1 sibling, 1 reply; 6+ messages in thread
From: Andreas Jaeger @ 2004-10-18 5:17 UTC (permalink / raw)
To: Maciej W. Rozycki
Cc: linux-mips, libc-alpha, Dominic Sweetman, Nigel Stephens,
Maciej W. Rozycki
[-- Attachment #1: Type: text/plain, Size: 701 bytes --]
"Maciej W. Rozycki" <macro@mips.com> writes:
> Hi,
>
> It seems nobody at the libc-alpha list is intersted in this fix, so I'm
> sending it here, so that people do not struggle against weird failures,
> while a fix is already done. The fix is needed for the current version of
> glibc.
Sorry, it took me longer to react than normal - but there is interest,
just not always time to do anything properly.
I've committed your patch after adjusting the copyright years also.
Thanks,
Andreas
--
Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
SUSE Linux AG, Maxfeldstr. 5, 90409 Nürnberg, Germany
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch] glibc 2.3: Memory clobber missing from syscalls
2004-10-18 5:17 ` Andreas Jaeger
@ 2004-10-18 16:08 ` Maciej W. Rozycki
0 siblings, 0 replies; 6+ messages in thread
From: Maciej W. Rozycki @ 2004-10-18 16:08 UTC (permalink / raw)
To: Andreas Jaeger
Cc: linux-mips, libc-alpha, Dominic Sweetman, Nigel Stephens,
Maciej W. Rozycki
On Mon, 18 Oct 2004, Andreas Jaeger wrote:
> Sorry, it took me longer to react than normal - but there is interest,
> just not always time to do anything properly.
OK, understood. I was just a bit surprised about such an obvious fix
taking so long.
> I've committed your patch after adjusting the copyright years also.
Thanks. More fixes to come.
Maciej
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch] glibc 2.3: Memory clobber missing from syscalls
2004-10-18 1:37 ` Atsushi Nemoto
@ 2004-10-20 3:05 ` Maciej W. Rozycki
2004-10-20 3:18 ` Ralf Baechle
0 siblings, 1 reply; 6+ messages in thread
From: Maciej W. Rozycki @ 2004-10-20 3:05 UTC (permalink / raw)
To: Atsushi Nemoto, Ralf Baechle
Cc: macro, linux-mips, Dominic Sweetman, Nigel Stephens
On Mon, 18 Oct 2004, Atsushi Nemoto wrote:
> Then, kernel header (include/asm-mips/unistd.h) should be fixed too?
Absolutely. These macros are not used extensively -- apparently only
_syscall3() is used for execve, but that does not mean they are meant to
be broken. Thanks for pointing the problem out.
Here is an update to a patch I proposed a while ago and which is still
needed. The patch applies to 2.4. For 2.6 just ignore missing files and
the single reject in unistd.h -- I think there is no point wasting
resources by sending another patch just to cover these bits.
Ralf, may I ask for approval? Please -- this has waited for too long
already IMHO...
Maciej
patch-mips-2.4.27-20041019-mips-asm-2
diff -up --recursive --new-file linux-mips-2.4.27-20041019.macro/include/asm-mips/sgiarcs.h linux-mips-2.4.27-20041019/include/asm-mips/sgiarcs.h
--- linux-mips-2.4.27-20041019.macro/include/asm-mips/sgiarcs.h 2004-10-17 03:58:21.000000000 +0000
+++ linux-mips-2.4.27-20041019/include/asm-mips/sgiarcs.h 2004-10-20 02:49:40.000000000 +0000
@@ -462,7 +462,7 @@ struct linux_smonblock {
long __vec = (long) romvec->dest; \
__asm__ __volatile__( \
"dsubu\t$29, 32\n\t" \
- "sw\t%6, 16($29)\n\t" \
+ "sw\t%7, 16($29)\n\t" \
"jalr\t%1\n\t" \
"daddu\t$29, 32\n\t" \
"move\t%0, $2" \
diff -up --recursive --new-file linux-mips-2.4.27-20041019.macro/include/asm-mips/uaccess.h linux-mips-2.4.27-20041019/include/asm-mips/uaccess.h
--- linux-mips-2.4.27-20041019.macro/include/asm-mips/uaccess.h 2004-10-17 03:58:21.000000000 +0000
+++ linux-mips-2.4.27-20041019/include/asm-mips/uaccess.h 2004-10-20 02:57:02.000000000 +0000
@@ -502,8 +502,7 @@ extern size_t __copy_user(void *__to, co
".set\tnoat\n\t" \
__UA_ADDU "\t$1, %1, %2\n\t" \
".set\tat\n\t" \
- ".set\treorder\n\t" \
- "move\t%0, $6" /* XXX */ \
+ ".set\treorder" \
: "+r" (__cu_to_r), "+r" (__cu_from_r), "+r" (__cu_len_r) \
: \
: "$8", "$9", "$10", "$11", "$12", "$15", "$24", "$31", \
diff -up --recursive --new-file linux-mips-2.4.27-20041019.macro/include/asm-mips/unistd.h linux-mips-2.4.27-20041019/include/asm-mips/unistd.h
--- linux-mips-2.4.27-20041019.macro/include/asm-mips/unistd.h 2004-04-09 02:58:05.000000000 +0000
+++ linux-mips-2.4.27-20041019/include/asm-mips/unistd.h 2004-10-20 00:50:11.000000000 +0000
@@ -491,7 +491,7 @@
#define __NR_semtimedop (__NR_Linux + 214)
/*
- * Offset of the last Linux flavoured syscall
+ * Offset of the last Linux 64-bit flavoured syscall
*/
#define __NR_Linux_syscalls 214
@@ -730,7 +730,7 @@
/*
* Offset of the last N32 flavoured syscall
*/
-#define __NR_N32_Linux_syscalls 219
+#define __NR_Linux_syscalls 219
#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
@@ -754,7 +754,8 @@ type name(void) \
".set\treorder" \
: "=&r" (__v0), "=r" (__a3) \
: "i" (__NR_##name) \
- : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \
+ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
+ "memory"); \
\
if (__a3 == 0) \
return (type) __v0; \
@@ -781,7 +782,8 @@ type name(atype a) \
".set\treorder" \
: "=&r" (__v0), "=r" (__a3) \
: "r" (__a0), "i" (__NR_##name) \
- : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \
+ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
+ "memory"); \
\
if (__a3 == 0) \
return (type) __v0; \
@@ -805,7 +807,8 @@ type name(atype a, btype b) \
".set\treorder" \
: "=&r" (__v0), "=r" (__a3) \
: "r" (__a0), "r" (__a1), "i" (__NR_##name) \
- : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \
+ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
+ "memory"); \
\
if (__a3 == 0) \
return (type) __v0; \
@@ -830,7 +833,8 @@ type name(atype a, btype b, ctype c) \
".set\treorder" \
: "=&r" (__v0), "=r" (__a3) \
: "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##name) \
- : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \
+ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
+ "memory"); \
\
if (__a3 == 0) \
return (type) __v0; \
@@ -855,7 +859,8 @@ type name(atype a, btype b, ctype c, dty
".set\treorder" \
: "=&r" (__v0), "+r" (__a3) \
: "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##name) \
- : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \
+ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
+ "memory"); \
\
if (__a3 == 0) \
return (type) __v0; \
@@ -891,7 +896,8 @@ type name(atype a, btype b, ctype c, dty
: "=&r" (__v0), "+r" (__a3) \
: "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##name), \
"m" ((unsigned long)e) \
- : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \
+ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
+ "memory"); \
\
if (__a3 == 0) \
return (type) __v0; \
@@ -923,7 +929,8 @@ type name(atype a, btype b, ctype c, dty
: "=&r" (__v0), "+r" (__a3) \
: "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##name), \
"m" ((unsigned long)e), "m" ((unsigned long)f) \
- : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \
+ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
+ "memory"); \
\
if (__a3 == 0) \
return (type) __v0; \
@@ -951,9 +958,10 @@ type name (atype a,btype b,ctype c,dtype
"syscall\n\t" \
"move\t%0, $2\n\t" \
".set\treorder" \
- : "=&r" (__v0), "+r" (__a3), "+r" (__a4) \
- : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##name) \
- : "$2","$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \
+ : "=&r" (__v0), "+r" (__a3) \
+ : "r" (__a0), "r" (__a1), "r" (__a2), "r" (__a4), "i" (__NR_##name) \
+ : "$2", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
+ "memory"); \
\
if (__a3 == 0) \
return (type) __v0; \
@@ -981,7 +989,8 @@ type name (atype a,btype b,ctype c,dtype
: "=&r" (__v0), "+r" (__a3) \
: "r" (__a0), "r" (__a1), "r" (__a2), "r" (__a4), "r" (__a5), \
"i" (__NR_##name) \
- : "$2","$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \
+ : "$2", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
+ "memory"); \
\
if (__a3 == 0) \
return (type) __v0; \
diff -up --recursive --new-file linux-mips-2.4.27-20041019.macro/include/asm-mips64/sgiarcs.h linux-mips-2.4.27-20041019/include/asm-mips64/sgiarcs.h
--- linux-mips-2.4.27-20041019.macro/include/asm-mips64/sgiarcs.h 2004-10-17 03:58:27.000000000 +0000
+++ linux-mips-2.4.27-20041019/include/asm-mips64/sgiarcs.h 2004-10-20 02:49:40.000000000 +0000
@@ -462,7 +462,7 @@ struct linux_smonblock {
long __vec = (long) romvec->dest; \
__asm__ __volatile__( \
"dsubu\t$29, 32\n\t" \
- "sw\t%6, 16($29)\n\t" \
+ "sw\t%7, 16($29)\n\t" \
"jalr\t%1\n\t" \
"daddu\t$29, 32\n\t" \
"move\t%0, $2" \
diff -up --recursive --new-file linux-mips-2.4.27-20041019.macro/include/asm-mips64/uaccess.h linux-mips-2.4.27-20041019/include/asm-mips64/uaccess.h
--- linux-mips-2.4.27-20041019.macro/include/asm-mips64/uaccess.h 2004-10-17 03:58:28.000000000 +0000
+++ linux-mips-2.4.27-20041019/include/asm-mips64/uaccess.h 2004-10-20 02:57:12.000000000 +0000
@@ -499,8 +499,7 @@ extern size_t __copy_user(void *__to, co
".set\tnoat\n\t" \
__UA_ADDU "\t$1, %1, %2\n\t" \
".set\tat\n\t" \
- ".set\treorder\n\t" \
- "move\t%0, $6" /* XXX */ \
+ ".set\treorder" \
: "+r" (__cu_to_r), "+r" (__cu_from_r), "+r" (__cu_len_r) \
: \
: "$8", "$9", "$10", "$11", "$12", "$15", "$24", "$31", \
diff -up --recursive --new-file linux-mips-2.4.27-20041019.macro/include/asm-mips64/unistd.h linux-mips-2.4.27-20041019/include/asm-mips64/unistd.h
--- linux-mips-2.4.27-20041019.macro/include/asm-mips64/unistd.h 2004-04-09 02:58:06.000000000 +0000
+++ linux-mips-2.4.27-20041019/include/asm-mips64/unistd.h 2004-10-20 00:53:47.000000000 +0000
@@ -268,8 +268,6 @@
#define __NR_O32_Linux 4000
#define __NR_O32_Linux_syscalls 240
-#define __NR_O32_Linux_syscalls 240
-
#if _MIPS_SIM == _MIPS_SIM_ABI64
/*
@@ -493,7 +491,7 @@
#define __NR_semtimedop (__NR_Linux + 214)
/*
- * Offset of the last Linux flavoured syscall
+ * Offset of the last Linux 64-bit flavoured syscall
*/
#define __NR_Linux_syscalls 214
@@ -732,7 +730,7 @@
/*
* Offset of the last N32 flavoured syscall
*/
-#define __NR_N32_Linux_syscalls 219
+#define __NR_Linux_syscalls 219
#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
@@ -756,7 +754,8 @@ type name(void) \
".set\treorder" \
: "=&r" (__v0), "=r" (__a3) \
: "i" (__NR_##name) \
- : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \
+ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
+ "memory"); \
\
if (__a3 == 0) \
return (type) __v0; \
@@ -783,7 +782,8 @@ type name(atype a) \
".set\treorder" \
: "=&r" (__v0), "=r" (__a3) \
: "r" (__a0), "i" (__NR_##name) \
- : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \
+ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
+ "memory"); \
\
if (__a3 == 0) \
return (type) __v0; \
@@ -807,7 +807,8 @@ type name(atype a, btype b) \
".set\treorder" \
: "=&r" (__v0), "=r" (__a3) \
: "r" (__a0), "r" (__a1), "i" (__NR_##name) \
- : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \
+ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
+ "memory"); \
\
if (__a3 == 0) \
return (type) __v0; \
@@ -832,7 +833,8 @@ type name(atype a, btype b, ctype c) \
".set\treorder" \
: "=&r" (__v0), "=r" (__a3) \
: "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##name) \
- : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \
+ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
+ "memory"); \
\
if (__a3 == 0) \
return (type) __v0; \
@@ -857,7 +859,8 @@ type name(atype a, btype b, ctype c, dty
".set\treorder" \
: "=&r" (__v0), "+r" (__a3) \
: "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##name) \
- : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \
+ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
+ "memory"); \
\
if (__a3 == 0) \
return (type) __v0; \
@@ -893,7 +896,8 @@ type name(atype a, btype b, ctype c, dty
: "=&r" (__v0), "+r" (__a3) \
: "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##name), \
"m" ((unsigned long)e) \
- : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \
+ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
+ "memory"); \
\
if (__a3 == 0) \
return (type) __v0; \
@@ -925,7 +929,8 @@ type name(atype a, btype b, ctype c, dty
: "=&r" (__v0), "+r" (__a3) \
: "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##name), \
"m" ((unsigned long)e), "m" ((unsigned long)f) \
- : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \
+ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
+ "memory"); \
\
if (__a3 == 0) \
return (type) __v0; \
@@ -953,9 +958,10 @@ type name (atype a,btype b,ctype c,dtype
"syscall\n\t" \
"move\t%0, $2\n\t" \
".set\treorder" \
- : "=&r" (__v0), "+r" (__a3), "+r" (__a4) \
- : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##name) \
- : "$2","$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \
+ : "=&r" (__v0), "+r" (__a3) \
+ : "r" (__a0), "r" (__a1), "r" (__a2), "r" (__a4), "i" (__NR_##name) \
+ : "$2", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
+ "memory"); \
\
if (__a3 == 0) \
return (type) __v0; \
@@ -983,7 +989,8 @@ type name (atype a,btype b,ctype c,dtype
: "=&r" (__v0), "+r" (__a3) \
: "r" (__a0), "r" (__a1), "r" (__a2), "r" (__a4), "r" (__a5), \
"i" (__NR_##name) \
- : "$2","$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \
+ : "$2", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
+ "memory"); \
\
if (__a3 == 0) \
return (type) __v0; \
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch] glibc 2.3: Memory clobber missing from syscalls
2004-10-20 3:05 ` Maciej W. Rozycki
@ 2004-10-20 3:18 ` Ralf Baechle
0 siblings, 0 replies; 6+ messages in thread
From: Ralf Baechle @ 2004-10-20 3:18 UTC (permalink / raw)
To: Maciej W. Rozycki
Cc: Atsushi Nemoto, linux-mips, Dominic Sweetman, Nigel Stephens
On Wed, Oct 20, 2004 at 04:05:40AM +0100, Maciej W. Rozycki wrote:
> Ralf, may I ask for approval? Please -- this has waited for too long
> already IMHO...
This looks right, go ahead. And don't expect any further approvals for
the next 8 hours ;-)
Ralf
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-10-20 3:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-15 12:47 [patch] glibc 2.3: Memory clobber missing from syscalls Maciej W. Rozycki
2004-10-18 1:37 ` Atsushi Nemoto
2004-10-20 3:05 ` Maciej W. Rozycki
2004-10-20 3:18 ` Ralf Baechle
2004-10-18 5:17 ` Andreas Jaeger
2004-10-18 16:08 ` Maciej W. Rozycki
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.