Re: make PROT_WRITE imply PROT_READ

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

> >you ask for it, and the kernel is supposed to deliver the best behavior
> >it can.
> 
> The kernel should provide
> 
> - a stable, reliable interface
> 
> - a consistent interface at least accross architectures, maybe even 
> platforms
> 
> 
> Providing write-only support for memory falls into none of these
> categories.  When Jason and I discussed this my position actually was
> to disallow PROT_WRITE without PROT_READ completely, making it an
> error of mmap and mprotect.  That's perfectly legal according to POSIX
> and it will teach those who write broken code like this.

Well, some hardware can probably support write-only, and such support
can be useful for "weird" applications, such as just-in-time
compilers, etc.

Usability for "normal" C applications is probably not too high... so
why not work around it in glibc, if at all?
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux