From: BlaisorBlade <blaisorblade_spam@yahoo.it>
To: user-mode-linux-devel@lists.sourceforge.net,
Jeff Dike <jdike@addtoit.com>
Cc: "Stroesser, Bodo" <Bodo.Stroesser@fujitsu-siemens.com>
Subject: Re: [uml-devel] Minor problems with interrupted systemcalls
Date: Sat, 18 Sep 2004 18:17:10 +0200 [thread overview]
Message-ID: <200409181817.10308.blaisorblade_spam@yahoo.it> (raw)
In-Reply-To: <8B6FF516CBA0194AB0996705076B02520F7C33@ABGEX01E.abg.fsc.net>
On Friday 17 September 2004 19:46, Stroesser, Bodo wrote:
> If a program is traced or debugged, in 2.6.x interrupted systemcalls
> with the results -ERESTARTxxxxxxx are not handled correctly, no
> systemcall restart is done.
>
> Here is a patch that should fix the problem. The patch is tested on
> 2.6.6 in tt and skas modes. It applies to 2.6.8.1, but I've not tested
> yet.
>
> Hope, this helps.
I read the patch a bit and I understand and agree on most changes; nice job,
mostly. However, I don't like at all the changes to
arch/um/kernel/signal_kern.c.
Could you explain them in more detail, and clean up this part of the patch?
Comments come below.
> -- uml_orig/arch/um/kernel/signal_kern.c 2004-08-05 18:36:24.000000000 +0200
> +++ uml/arch/um/kernel/signal_kern.c 2004-09-17 15:03:30.441065600
+0200
> @@ -132,19 +132,18 @@
> {
> siginfo_t info;
> struct k_sigaction *ka;
> - int err, sig;
> + int sig;
>
> if (!oldset)
> oldset = ¤t->blocked;
>
> sig = get_signal_to_deliver(&info, regs, NULL);
> - if(sig == 0)
> - return(0);
Could you explain why the sig == 0 check must be dropped? I went reading
get_signal_to_deliver and sig == 0 seems to mean that no signal is available.
(But I don't understand what "current->notifier" is, but it does not seem
related to syscall restarting).
> -
> - /* Whee! Actually deliver the signal. */
> - ka = ¤t->sighand->action[sig -1 ];
> - err = handle_signal(regs, sig, ka, &info, oldset, error);
Why do you drop the handling of errors from handle_signal()? If you do this to
workaround handle_signal() bugs in handling -ERESTART*, fix handle_signal();
there are other errors that it can return, and that you must handle.
> - if(!err) return(1);
> + if(sig > 0) {
> + /* Whee! Actually deliver the signal. */
> + ka = ¤t->sighand->action[sig -1 ];
> + handle_signal(regs, sig, ka, &info, oldset, error);
> + return(1);
> + }
>
> /* Did we come from a system call? */
> if(PT_REGS_SYSCALL_NR(regs) >= 0){
--
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next prev parent reply other threads:[~2004-09-18 17:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-17 17:46 [uml-devel] Minor problems with interrupted systemcalls Stroesser, Bodo
2004-09-18 16:17 ` BlaisorBlade [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-09-20 10:06 Stroesser, Bodo
2004-09-21 17:31 ` BlaisorBlade
2004-09-22 17:12 Stroesser, Bodo
2004-09-24 21:32 ` Jeff Dike
2004-09-24 21:32 ` Jeff Dike
2004-09-24 21:32 ` Jeff Dike
2004-09-24 21:32 ` Jeff Dike
2004-09-24 21:32 ` Jeff Dike
2004-09-29 16:34 Stroesser, Bodo
2004-09-29 21:10 ` Jeff Dike
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=200409181817.10308.blaisorblade_spam@yahoo.it \
--to=blaisorblade_spam@yahoo.it \
--cc=Bodo.Stroesser@fujitsu-siemens.com \
--cc=jdike@addtoit.com \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox