lkml.org 
[lkml]   [2006]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 1/5] mm: remap_vmalloc_range
On Fri, Apr 21, 2006 at 12:59:13AM -0700, Andrew Morton wrote:
> Nick Piggin <npiggin@suse.de> wrote:
> >
> > They should use vma->vm_page_prot?
> >
> > The callers affected are the PAGE_SHARED ones (the others are unchanged).
> > Isn't it correct to provide readonly mappings if userspace asks for it?
>
> Dunno. I assume perfmon was using PAGE_READONLY because it doesn't want
> userspace altering the memory. One would think that this should be
> enforced at mmap()-time, and that mprotect() might be able to override it
> anyway. But I haven't looked that closely.

Oh yes definitely, and the perfmon case is OK, because it sets
PAGE_READONLY in ->vm_page_prot. About the mprotect issue -- I'm
not sure, this might be a problem for perfmon?

> First impression is that there's some potential for breaking stuff in all
> this - convince me otherwise ;)

Well, the PAGE_SHARED guys might break if userspace if they expect to be
able to write to readonly mappings. Unfortunate, but we could just put our
feet down and tell them to fix the code?
-
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/

\
 
 \ /
  Last update: 2006-04-21 10:09    [W:2.252 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site