lkml.org 
[lkml]   [2018]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v3 1/5] x86/mm: avoid redundant checking if pgprot has no change
Date
On Tue, 2018-09-04 at 09:49 +0200, Thomas Gleixner wrote:
> On Tue, 4 Sep 2018, Yang, Bin wrote:
> > On Mon, 2018-09-03 at 23:57 +0200, Thomas Gleixner wrote:
> > >
> > > The last patch which does the overlap check is equally broken:
> >
> > Sorry that I did not understand the broken of last patch.
>
> I meant 4/5 sorry. That's the one which introduces the overlap check and
> does this:
>
> > > + /*
> > > + * Ensure that the requested pgprot does not violate static protection
> > > + * requirements.
> > > + */
> > > + new_prot = static_protections(req_prot, address,
> > > + numpages << PAGE_SHIFT, pfn);
> > >
> > > It expands new_prot to the whole range even if the protections only
> > > overlap. That should not happen in practice, but we have no checks for that
> > > at all.
> >
> > Below code in patch #3 should cover this check. It will double check
> > new_prot in whole large page range.
>
> Which is exactly what is wrong. Read again what I wrote.
>
> Thanks,
>
> tglx
\
 
 \ /
  Last update: 2018-09-04 11:13    [W:0.051 / U:2.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site