All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
To: Blaisorblade <blaisorblade_spam@yahoo.it>
Cc: jdike@addtoit.com, Gerd Knorr <kraxel@bytesex.org>,
	user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] Re: [patch 1/1] SYSEMU: avoid intercepting syscall on return when using SYSCALL again.
Date: Fri, 29 Oct 2004 03:19:06 +0200	[thread overview]
Message-ID: <41819A8A.20403@fujitsu-siemens.com> (raw)
In-Reply-To: <200410290200.46907.blaisorblade_spam@yahoo.it>

Blaisorblade wrote:
> No. Just strace any process inside UML. Let's "strace ls". Last time I 
> checked, it does not work. Oh hell! It works (as of 2.6.9)! Well, you already 
> fixed that.
> 
No. Here you are wrong. The problem is still there (or is it again there?).
Sorry.

My latest patch "patch-singlestep-sighdlr" has been too complete!
Setting TIF_SIGPENDING after ptrace_notify() in syscall_trace() in neccessary
only on the 2nd tracepoint (entryexit == 1).
And setting it on the 1st tracepoint lets some specific systemcalls loop.
Example: sys_rt_sigaction() wants to be called without SIGPENDING. Thus it returns
with -ERESTARTNOINTR. On return do_signal() is called, which resets TIF_SIGPENDING
and sets EIP back to the syscall. Now the syscall starts, runs through
syscall_trace() and TIF_SIGPENDING is set again. Now it returns with -ERESTARTNOINTR
...
...

Here's the patch:

---

--- a/arch/um/kernel/ptrace.c	2004-10-29 02:27:42.000000000 +0200
+++ b/arch/um/kernel/ptrace.c	2004-10-29 02:28:24.000000000 +0200
@@ -330,7 +330,8 @@ void syscall_trace(union uml_pt_regs *re
  	   between a syscall stop and SIGTRAP delivery */
  	ptrace_notify(SIGTRAP | (((current->ptrace & PT_TRACESYSGOOD) &&
  				 !is_singlestep) ? SYSCALL_TRAP : 0));
-	set_thread_flag(TIF_SIGPENDING); /* force do_signal() --> is_syscall() */
+	if ( entryexit ) /* force do_signal() --> is_syscall() */
+		set_thread_flag(TIF_SIGPENDING);

  	/*
  	 * this isn't the same as continuing with a signal, but it will do



-------------------------------------------------------
This Newsletter Sponsored by: Macrovision 
For reliable Linux application installations, use the industry's leading
setup authoring tool, InstallShield X. Learn more and evaluate 
today. http://clk.atdmt.com/MSI/go/ins0030000001msi/direct/01/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

  parent reply	other threads:[~2004-10-29  1:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-21 23:18 [uml-devel] [patch 1/1] SYSEMU: avoid intercepting syscall on return when using SYSCALL again blaisorblade_spam
2004-10-22  0:37 ` BlaisorBlade
2004-10-22  9:22 ` [uml-devel] " Bodo Stroesser
2004-10-22 16:14   ` BlaisorBlade
2004-10-22 16:23     ` Bodo Stroesser
2004-10-27 14:21       ` Bodo Stroesser
2004-10-28 23:04         ` Blaisorblade
2004-10-28 23:36           ` Bodo Stroesser
     [not found]             ` <200410290200.46907.blaisorblade_spam@yahoo.it>
2004-10-29  1:19               ` Bodo Stroesser [this message]
2004-10-29  7:51                 ` Gerd Knorr
2004-10-29 13:09                   ` Blaisorblade

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=41819A8A.20403@fujitsu-siemens.com \
    --to=bstroesser@fujitsu-siemens.com \
    --cc=blaisorblade_spam@yahoo.it \
    --cc=jdike@addtoit.com \
    --cc=kraxel@bytesex.org \
    --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 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.