Hi Marcelo. This patch submitted by Ullrich Drepper to 2.6 last week fixes the behaviour of 'noexec' mounted partitions. Up until now it was possible to circumvent the 'noexec' flag and run binaries off a 'noexec' partition by using ld-linux.so.2 or any other executable loader. This patch allows to properly honour the 'noexec' behaviour. Please review and apply. Regards, Nuno --- linux-2.4.24-pre1/mm/mmap.c.orig 2003-12-13 11:52:56.943963096 +0000 +++ linux-2.4.24-pre1/mm/mmap.c 2003-12-13 11:55:37.674528336 +0000 @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -400,8 +401,13 @@ int error; rb_node_t ** rb_link, * rb_parent; - if (file && (!file->f_op || !file->f_op->mmap)) - return -ENODEV; + if (file) { + if (!file->f_op || !file->f_op->mmap) + return -ENODEV; + + if ((prot & PROT_EXEC) && (file->f_vfsmnt->mnt_flags & MNT_NOEXEC)) + return -EPERM; + } if (!len) return addr; - 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/