Re: Anybody out there? (ETXTBSY)

Linus Torvalds (torvalds@transmeta.com)
28 Aug 1998 03:05:52 GMT


In article <19980827023536.C9225@dot.cygnus.com>,
Richard Henderson <rth@cygnus.com> wrote:
>On Wed, Aug 26, 1998 at 02:26:28PM -0500, pacman wrote:
>> Is nobody interested on getting ETXTBSY to work for shared libs? Come on,
>> take a break from the EFAULT wars and walk down the street to 26 Errno Lane
>> and tell me what you think.
>
>ETXTBSY is explicitly not set on shared libraries. If you turn
>it on, it is impossible to upgrade libc.so.

No, the reason ETXTBSY is dangerous is mainly because it's a great
denial-of-service thing. As such, the MAP_EXECUTABLE thing that Linux
uses internally is not exported to user level, and as such the loader
can't use it even if it wished.

The reason MAP_EXECUTABLE isn't exported is programs like this:

fd = open("/var/spool/utmp");
mmap( ... fd ... MAP_EXECUTABLE ...);
sleep(forever); /* nobody is able to log in */

which used to actually happen.

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html