Messages in this thread | ![/](/images/icornerl.gif) | | Date | 9 Oct 2003 17:12:12 +0200 | Date | Thu, 9 Oct 2003 17:12:12 +0200 | From | Andi Kleen <> | Subject | Re: [PATCH] Fix mlockall for PROT_NONE mappings |
| |
On Thu, Oct 09, 2003 at 07:56:07AM -0700, Linus Torvalds wrote: > > On 9 Oct 2003, Andi Kleen wrote: > > > > That is exactly what the patch is doing. > > No it's not. > > What I'm asking for is a simple > > if (vma->vm_flags & VM_READ) > make_pages_readable(); > > kind of thing. A couple of one-liners in the _callers_, not a horribly > ugly change way down the stack.
Ok. But what is with mappings that have MAY_READ not set ? [not 100% this cannot happen]
Without the changes make_pages_present didn't call get_user_pages with the "force" argument. And changing it unconditionally would change the behaviour for everybody.
Also there is still the problem that it will fail early for SIGBUS that happens for other reasons (e.g. a hardware driver not being able to mmap everything)
-Andi
- 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/
| ![\](/images/icornerr.gif) |