mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Blaisorblade <blaisorblade_spam@yahoo.it>
To: Chris Wedgwood <cw@f00f.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Fixing UML against NPTL (was: Re: [uml-devel] [PATCH] UML: Use PTRACE_KILL instead of SIGKILL to kill host-OS processes (take #2))
Date: Thu, 4 Nov 2004 05:31:21 +0100	[thread overview]
Message-ID: <200411040531.29596.blaisorblade_spam@yahoo.it> (raw)
In-Reply-To: <20041104003943.GB17467@taniwha.stupidest.org>

[-- Attachment #1: Type: text/plain, Size: 1571 bytes --]

On Thursday 04 November 2004 01:39, Chris Wedgwood wrote:
> On Thu, Nov 04, 2004 at 01:13:27AM +0100, Blaisorblade wrote:
> > Well, not a lot of new work should go there.
>
> agreed
>
> > Not always. Do you think I'm a luser? Or what?
>
> no, not at all
>
> i was asking what break to see if i can help

Intimate Linking Script and NPTL knowledge would help a lot.

The issues are 2 ones:

1) LKML does not link because the linker does not like it's linker script, 
which defines a special thread_private section (give a look at switcheroo() 
and you could maybe realize the issue of copying the .text to a tmpfs file 
and replacing the mapping to the executable with the tmpfs file mapping).

2) getpid() on a child clone returns the process's pid when run with a 
NPTL-enabled glibc, while it returns the thread pid with a LinuxThreads one; 
this causes tons of problems with UML, which uses signals as inter-thread and 
intra-thread communication.

Note UML is not using pthread_create() to create the threads, where this 
behaviour is an improvement. I'm using a plain clone() call without the 
CLONE_THREAD flag (which is not even added in by glibc, according to strace).

I've not yet checked if glibc is hijacking getpid() or not, but that would be 
strange anyway.

Also, this behaviour has been reported the first time about at the time of 
2.6.0, but actually UML has almost never runs against NPTL glibc, because 
it's statically linked most times.

-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2004-11-04  4:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-03 11:37 [PATCH] UML: Use PTRACE_KILL instead of SIGKILL to kill host-OS processes Chris Wedgwood
2004-11-03 11:47 ` Anton Altaparmakov
2004-11-03 12:08   ` [PATCH] UML: Use PTRACE_KILL instead of SIGKILL to kill host-OS processes (take #2) Chris Wedgwood
2004-11-03 19:28     ` [uml-devel] " 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
     [not found] ` <200411040113.27747.blaisorblade_spam@yahoo.it>
     [not found]   ` <20041104003943.GB17467@taniwha.stupidest.org>
2004-11-04  4:31     ` Blaisorblade [this message]
2004-11-11 17:45       ` Fixing UML against NPTL (was: Re: [uml-devel] [PATCH] UML: Use PTRACE_KILL instead of SIGKILL to kill host-OS processes (take #2)) Daniel Jacobowitz
2004-11-11 18:31         ` Christophe Saout
2004-11-11 18:45           ` Daniel Jacobowitz
2004-11-12  0: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=200411040531.29596.blaisorblade_spam@yahoo.it \
    --to=blaisorblade_spam@yahoo.it \
    --cc=cw@f00f.org \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®