Messages in this thread | | | From | "pacman" <> | Subject | Re: Anybody out there? (ETXTBSY) | Date | Fri, 28 Aug 1998 14:18:52 -0500 (EST) |
| |
Linus Torvalds writes the following: > >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.
s/MAP_EXECUTABLE/MAP_DENYWRITE/
My patch (http://www.linuxhq.com/lnxlists/linux-kernel/lk_9808_04/msg00086.html) gets around that problem by making ETXTBSY a side effect of mmap(PROT_EXEC), and by checking PROT_EXEC against the x permission bit. This eliminates the security problem, and also pretty much eliminates the need for MAP_DENYWRITE as a separate flag, but I didn't go so far as to remove it.
In case you missed it, my original post (http://www.linuxhq.com/lnxlists/linux-kernel/lk_9808_03/msg01132.html) brought up some other questions you might want to consider, but it also contains a bad version of the patch, so don't use that one
-- Alan Curry
- 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
| |