From: Randolph Chung <randolph@tausq.org>
To: parisc-linux@lists.parisc-linux.org
Subject: [parisc-linux] how to handle ERESTART_RESTARTBLOCK ?
Date: Mon, 11 Aug 2003 23:02:44 -0700 [thread overview]
Message-ID: <20030812060244.GE21328@tausq.org> (raw)
I commited some broken code into 2.6 cvs just now, so now i need some
help to fix it ;-) sorry for the verbose explanation below, but i need
to write this down to make sure i understand it myself :-)
Our signal handling code was not handling ERESTART_RESTARTBLOCK
correctly. as far as I can tell, the semantics of this is that if a
syscall function returns with that error code, we are supposed to
restart the syscall, but with a new syscall number
(__NR_restart_syscall -- which we don't define at the moment)
The problem is that our syscall mechanism doesn't really allow this
(afaict). Our syscall sequence looks like this:
ble <address of gateway page>
ldi <syscall number>, %r20
[ we enter the kernel at this point ]
and the way we handle restarting other syscalls is to set the iaoq back
by two insns, so we do the ble again. there's a comment about this in
the code (signal.c)
/* Hooray for delayed branching. We don't
have to restore %r20 (the system call
number) because it gets loaded in the delay
slot of the branch external instruction. */
regs->gr[31] -= 8;
which is all well and good, except i don't see how we can change the
syscall number to restart it for the ERESTART_RESTARTBLOCK case.
why is it bad to just call sys_restart_syscall directly from
do_signal()?
any suggestions on how to handle this properly?
thanks
randolph
--
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/
next reply other threads:[~2003-08-12 5:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-12 6:02 Randolph Chung [this message]
2003-10-26 7:37 ` [parisc-linux] Re: how to handle ERESTART_RESTARTBLOCK ? Randolph Chung
2003-10-26 7:39 ` Randolph Chung
2003-10-26 16:49 ` Carlos O'Donell
2003-10-26 19:18 ` Randolph Chung
2003-10-26 19:53 ` John David Anglin
2003-10-26 20:59 ` Randolph Chung
2003-10-26 21:02 ` Randolph Chung
2003-10-27 4:37 ` Carlos O'Donell
2003-10-27 5:06 ` Randolph Chung
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030812060244.GE21328@tausq.org \
--to=randolph@tausq.org \
--cc=parisc-linux@lists.parisc-linux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.