public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: ebiederman@lnxi.com (Eric W. Biederman)
To: "David S. Miller" <davem@redhat.com>
Cc: Linus Torvalds <torvalds@transmeta.com>,
	<linux-kernel@vger.kernel.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [PATCH] Longstanding elf fix (2.4.3 fix)
Date: 23 Apr 2001 10:05:07 -0600	[thread overview]
Message-ID: <m3snizbo0c.fsf@DLT.linuxnetworx.com> (raw)
In-Reply-To: <m31yqk8oas.fsf@DLT.linuxnetworx.com> <15075.40500.408470.152332@pizda.ninka.net>
In-Reply-To: "David S. Miller"'s message of "Sun, 22 Apr 2001 20:15:00 -0700 (PDT)"

"David S. Miller" <davem@redhat.com> writes:

> Eric W. Biederman writes:
>  > In building a patch for 2.4.3 I also discovered that we are not taking 
>  > the mmap_sem around do_brk in the exec paths.
> 
> Does that really matter?  Who else can get at the address space?  We
> are a singly referenced address space at that point... perhaps ptrace?

Well looking a little more closely than I did last night it looks like
access_process_vm (called from ptrace) can cause what amounts to a
page fault at pretty arbitrary times.  

ptrace is protected by the big kernel lock, but exec isn't so that
doesn't help.  Hmm.  ptrace does require that the process be stopped
in all cases, before it does anything and that probably saves us.  This
is subtle enough I'd rather be locally correct, and not have to
worry about someone enhancing ptrace...

I'm actually a little curious what the big kernel lock in ptrace buys
us.  I suspect it could be a performance issue with user mode linux.
Where you have multiple processes being ptraced at the same time.

Eric

  parent reply	other threads:[~2001-04-23 16:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-23  0:14 [PATCH] Longstanding elf fix (2.4.3 fix) Eric W. Biederman
2001-04-23  3:15 ` David S. Miller
2001-04-23  7:44   ` Eric W. Biederman
2001-04-23  7:59     ` Philip Blundell
2001-04-23 16:05   ` Eric W. Biederman [this message]
2001-04-23 17:39     ` Linus Torvalds
2001-04-23 18:54       ` Eric W. Biederman
2001-04-24 22:34         ` Ion Badulescu
2001-04-24 23:34           ` Eric W. Biederman
  -- strict thread matches above, loose matches on Subject: below --
2001-04-23 21:54 Manfred Spraul
2001-04-24  7:19 ` Eric W. Biederman

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=m3snizbo0c.fsf@DLT.linuxnetworx.com \
    --to=ebiederman@lnxi.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=davem@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /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