lkml.org 
[lkml]   [2001]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Longstanding elf fix (2.4.3 fix)
From
Date
"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?

In the library loader I can certainly see it making a difference.

> Who else can get at the address space?
> We are a singly referenced address space at that point... perhaps ptrace?

In practice I don't see it being a big deal. But reliable code is
made by closing all of the little loop holes.

It also improves consistency as all of the calls to do_mmap are
already protected in the exec paths.

And of course since much of the code in the kernel is built on the
copy a good example neglecting the locking without a big comment,
invites trouble elsewhere like in elf_load_library. Where we could
have multiple threads running.

Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:17    [W:0.101 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site