> 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.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to email@example.com
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/