public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/933] New: MIPS (n)64 syscall() implemented incorrectly
@ 2005-05-05 19:23 macro at linux-mips dot org
2005-05-06 15:18 ` [Bug libc/933] " macro at linux-mips dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: macro at linux-mips dot org @ 2005-05-05 19:23 UTC (permalink / raw)
To: glibc-bugs
Linux assumes it can restart a syscall by resuming userland execution at
the instruction preceding the "syscall" instruction and that code there
will restore the number of the syscall as passed in $v0. This convention
is not obeyed in sysdeps/unix/sysv/linux/mips/mips64/syscall.S, which does:
move $a6, $a7
syscall
instead. See bits related to the ERESTARTNOINTR error code in
arch/mips/kernel/signal.c within Linux sources for further reference.
I'll try to prepare a fix, but if it takes too long, this report will
hopefully incline someone else. ;-)
--
Summary: MIPS (n)64 syscall() implemented incorrectly
Product: glibc
Version: 2.3.5
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: gotom at debian dot or dot jp
ReportedBy: macro at linux-mips dot org
CC: glibc-bugs at sources dot redhat dot com
GCC host triplet: mipsel-unknown-linux-gnu
http://sources.redhat.com/bugzilla/show_bug.cgi?id=933
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libc/933] MIPS (n)64 syscall() implemented incorrectly
2005-05-05 19:23 [Bug libc/933] New: MIPS (n)64 syscall() implemented incorrectly macro at linux-mips dot org
@ 2005-05-06 15:18 ` macro at linux-mips dot org
2005-05-06 15:19 ` macro at linux-mips dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: macro at linux-mips dot org @ 2005-05-06 15:18 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From macro at linux-mips dot org 2005-05-06 15:18 -------
I've found other two places where an incorrect sequence is used for
syscalls and prepared a fix as follows. Additionally it fixes an incorrect
GP restoration directive as well as an inaccurate comment.
2005-05-06 Maciej W. Rozycki <macro@linux-mips.org>
* sysdeps/unix/sysv/linux/mips/brk.c (__brk): Load the number of the
syscall immediately before invocation.
* sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S (__ioctl): Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/syscall.S (syscall): Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S (__ioctl): Use macros
to handle GP.
* sysdeps/unix/sysv/linux/mips/mips64/syscall.S (syscall): Likewise.
Update inaccurate comments.
Please apply. It works for the mainline as well.
--
http://sources.redhat.com/bugzilla/show_bug.cgi?id=933
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libc/933] MIPS (n)64 syscall() implemented incorrectly
2005-05-05 19:23 [Bug libc/933] New: MIPS (n)64 syscall() implemented incorrectly macro at linux-mips dot org
2005-05-06 15:18 ` [Bug libc/933] " macro at linux-mips dot org
@ 2005-05-06 15:19 ` macro at linux-mips dot org
2005-06-01 14:38 ` gotom at debian dot or dot jp
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: macro at linux-mips dot org @ 2005-05-06 15:19 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From macro at linux-mips dot org 2005-05-06 15:19 -------
Created an attachment (id=479)
--> (http://sources.redhat.com/bugzilla/attachment.cgi?id=479&action=view)
glibc-2.3.5-mips-syscall.patch
--
http://sources.redhat.com/bugzilla/show_bug.cgi?id=933
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libc/933] MIPS (n)64 syscall() implemented incorrectly
2005-05-05 19:23 [Bug libc/933] New: MIPS (n)64 syscall() implemented incorrectly macro at linux-mips dot org
2005-05-06 15:18 ` [Bug libc/933] " macro at linux-mips dot org
2005-05-06 15:19 ` macro at linux-mips dot org
@ 2005-06-01 14:38 ` gotom at debian dot or dot jp
2005-07-01 16:06 ` macro at linux-mips dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: gotom at debian dot or dot jp @ 2005-06-01 14:38 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From gotom at debian dot or dot jp 2005-06-01 14:38 -------
Please see and check it in.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|gotom at debian dot or dot |aj at suse dot de
|jp |
Status|NEW |ASSIGNED
http://sources.redhat.com/bugzilla/show_bug.cgi?id=933
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libc/933] MIPS (n)64 syscall() implemented incorrectly
2005-05-05 19:23 [Bug libc/933] New: MIPS (n)64 syscall() implemented incorrectly macro at linux-mips dot org
` (2 preceding siblings ...)
2005-06-01 14:38 ` gotom at debian dot or dot jp
@ 2005-07-01 16:06 ` macro at linux-mips dot org
2005-09-16 12:21 ` aj at suse dot de
2005-09-16 12:22 ` cvs-commit at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: macro at linux-mips dot org @ 2005-07-01 16:06 UTC (permalink / raw)
To: glibc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |drow at false dot org
http://sources.redhat.com/bugzilla/show_bug.cgi?id=933
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libc/933] MIPS (n)64 syscall() implemented incorrectly
2005-05-05 19:23 [Bug libc/933] New: MIPS (n)64 syscall() implemented incorrectly macro at linux-mips dot org
` (3 preceding siblings ...)
2005-07-01 16:06 ` macro at linux-mips dot org
@ 2005-09-16 12:21 ` aj at suse dot de
2005-09-16 12:22 ` cvs-commit at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: aj at suse dot de @ 2005-09-16 12:21 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From aj at suse dot de 2005-09-16 12:21 -------
Committed for CVS head.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://sourceware.org/bugzilla/show_bug.cgi?id=933
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libc/933] MIPS (n)64 syscall() implemented incorrectly
2005-05-05 19:23 [Bug libc/933] New: MIPS (n)64 syscall() implemented incorrectly macro at linux-mips dot org
` (4 preceding siblings ...)
2005-09-16 12:21 ` aj at suse dot de
@ 2005-09-16 12:22 ` cvs-commit at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-16 12:22 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-09-16 12:21 -------
Subject: Bug 933
CVSROOT: /cvs/glibc
Module name: libc
Changes by: aj@sources.redhat.com 2005-09-16 12:21:01
Modified files:
sysdeps/unix/sysv/linux/mips/mips64/n64: ioctl.S
sysdeps/unix/sysv/linux/mips/mips64: syscall.S
sysdeps/unix/sysv/linux/mips: brk.c
. : ChangeLog
Log message:
2005-09-16 Maciej W. Rozycki <macro@linux-mips.org>
[BZ #933]
* sysdeps/unix/sysv/linux/mips/brk.c (__brk): Load the number of
the syscall immediately before invocation.
* sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S (__ioctl): Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/syscall.S (syscall): Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S (__ioctl): Use
macros to handle GP.
* sysdeps/unix/sysv/linux/mips/mips64/syscall.S (syscall):
Likewise. Update inaccurate comments.
Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S.diff?cvsroot=glibc&r1=1.2&r2=1.3
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/mips/mips64/syscall.S.diff?cvsroot=glibc&r1=1.1&r2=1.2
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/mips/brk.c.diff?cvsroot=glibc&r1=1.2&r2=1.3
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/ChangeLog.diff?cvsroot=glibc&r1=1.9525&r2=1.9526
--
http://sourceware.org/bugzilla/show_bug.cgi?id=933
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-09-16 12:22 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-05 19:23 [Bug libc/933] New: MIPS (n)64 syscall() implemented incorrectly macro at linux-mips dot org
2005-05-06 15:18 ` [Bug libc/933] " macro at linux-mips dot org
2005-05-06 15:19 ` macro at linux-mips dot org
2005-06-01 14:38 ` gotom at debian dot or dot jp
2005-07-01 16:06 ` macro at linux-mips dot org
2005-09-16 12:21 ` aj at suse dot de
2005-09-16 12:22 ` cvs-commit at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).