lkml.org 
[lkml]   [2020]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v34 10/24] mm: Add vm_ops->mprotect()
On Mon, Jul 06, 2020 at 08:22:54PM -0700, Sean Christopherson wrote:
> On Tue, Jul 07, 2020 at 04:14:24AM +0100, Matthew Wilcox wrote:
> > > + if (vma->vm_ops && vma->vm_ops->mprotect) {
> > > + error = vma->vm_ops->mprotect(vma, nstart, tmp, prot);
> > > + if (error)
> > > + goto out;
> > > + }
>
> Based on "... and then the vma owner can do whatever it needs to before
> calling mprotect_fixup(), which is already not static", my interpretation
> is that Matthew's intent was to do:
>
> if (vma->vm_ops && vma->vm_ops->mprotect)
> error = = vma->vm_ops->mprotect(vma, nstart, tmp, prot);
> else
> error = mprotect_fixup(vma, &prev, nstart, tmp, newflags);
> if (error)
> goto out;
>
> i.e. make .mprotect() a full replacement as opposed to a prereq hook.

Yes, it was. I was just looking at the next patch to be sure this was
how I'd been misunderstood.

\
 
 \ /
  Last update: 2020-07-07 05:27    [W:0.317 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site