Re: mmap() on cdrom files fails since 2.6.9-rc2-bk2

From: Jean Delvare
Date: Sun Oct 03 2004 - 07:12:07 EST


Hi Ingo,

> > old_mmap(NULL, 42, PROT_READ, MAP_SHARED, 3, 0) = -1 EPERM
> > (Operation not permitted)
>
> could you try the patch below? mmap() done from !pt_gnu_stack binaries
> on noexec mounted filesystems indeed could fail due to the extra
> PROT_EXEC bit.

Indeed, all files on which mmap was failing were located on noexec'd
devices (although for the cdrom the noexec is not explicitely stated in
my /etc/fstab file). Your patch fixes my problem, mmap on these devices
is working again. Thanks!

Now I'm only curious as to why the problem only affected me. Since it
looks like noexec is implied on cdrom devices, the problem should have
affected everyone. Or are the "!pt_gnu_stack binaries" something rare? I
admit I have no idea what it refers to.

Thanks again.

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