From: Chris Wedgwood <cw@f00f.org>
To: Jeff Dike <jdike@addtoit.com>
Cc: Anton Altaparmakov <aia21@cam.ac.uk>,
Blaisorblade <blaisorblade_spam@yahoo.it>,
user-mode-linux-devel@lists.sourceforge.net,
Andrew Morton <akpm@osdl.org>,
lkml <linux-kernel@vger.kernel.org>
Subject: [uml-devel] [PATCH] UML: Use PTRACE_KILL instead of SIGKILL to kill host-OS processes (take #2)
Date: Wed, 3 Nov 2004 04:08:29 -0800 [thread overview]
Message-ID: <20041103120829.GA23182@taniwha.stupidest.org> (raw)
In-Reply-To: <1099482457.16445.1.camel@imp.csi.cam.ac.uk>
On Wed, Nov 03, 2004 at 11:47:38AM +0000, Anton Altaparmakov wrote:
> You have two %d but only one argument. You seem to have forgotten
> an "old_pid, " in there.
doh! it's a warning if something iffy happens (which so far for me it
hasn't) which explains why i missed it... not sure why i didn't get a
build warning though... thanks!
---
kill(..., SIGKILL) doesn't work to kill host-OS processes created in
the exec path in TT mode --- for this we need PTRACE_KILL (it did work
in previous kernels, but not by design). Without this process will
accumulate on the host-OS (although the won't be visible inside UML).
Signed-off-by: Chris Wedgwood <cw@f00f.org>
---
Index: cw-current/arch/um/kernel/tt/exec_user.c
===================================================================
--- cw-current.orig/arch/um/kernel/tt/exec_user.c 2004-11-03 02:10:18.064830204 -0800
+++ cw-current/arch/um/kernel/tt/exec_user.c 2004-11-03 04:05:00.435843464 -0800
@@ -35,7 +35,8 @@
tracer_panic("do_exec failed to get registers - errno = %d",
errno);
- kill(old_pid, SIGKILL);
+ if (ptrace(PTRACE_KILL, old_pid, NULL, NULL))
+ printk("Warning: ptrace(PTRACE_KILL, %d, ...) saw %d\n", old_pid, errno);
if(ptrace_setregs(new_pid, regs) < 0)
tracer_panic("do_exec failed to start new proc - errno = %d",
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
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-11-03 12:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-03 11:37 [uml-devel] [PATCH] UML: Use PTRACE_KILL instead of SIGKILL to kill host-OS processes Chris Wedgwood
2004-11-03 11:47 ` [uml-devel] " Anton Altaparmakov
2004-11-03 12:08 ` Chris Wedgwood [this message]
2004-11-03 19:28 ` [uml-devel] [PATCH] UML: Use PTRACE_KILL instead of SIGKILL to kill host-OS processes (take #2) Blaisorblade
2004-11-03 20:09 ` Chris Wedgwood
2004-11-03 22:51 ` Blaisorblade
2004-11-03 20:18 ` Gerd Knorr
2004-11-03 20:48 ` Chris Wedgwood
2004-11-04 0:23 ` Blaisorblade
2004-11-03 23:19 ` Blaisorblade
2004-11-19 16:17 ` [uml-devel] [PATCH] UML: Use PTRACE_KILL instead of SIGKILL to kill host-OS processes Bodo Stroesser
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=20041103120829.GA23182@taniwha.stupidest.org \
--to=cw@f00f.org \
--cc=aia21@cam.ac.uk \
--cc=akpm@osdl.org \
--cc=blaisorblade_spam@yahoo.it \
--cc=jdike@addtoit.com \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox