lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b75b65e3fe222fc927ee8e7379d5760d4cdafe8b.camel@intel.com>
Date:   Tue, 4 Sep 2018 09:22:19 +0000
From:   "Yang, Bin" <bin.yang@...el.com>
To:     "tglx@...utronix.de" <tglx@...utronix.de>
CC:     "mingo@...nel.org" <mingo@...nel.org>,
        "hpa@...or.com" <hpa@...or.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "Gross, Mark" <mark.gross@...el.com>,
        "x86@...nel.org" <x86@...nel.org>,
        "Hansen, Dave" <dave.hansen@...el.com>
Subject: Re: [PATCH v3 1/5] x86/mm: avoid redundant checking if pgprot has
 no change

On Tue, 2018-09-04 at 17:11 +0800, Bin Yang wrote:
> 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.

It looks this new_prot might have less protection bits and always
passes the following check at the begin numpages. I think it can be
changed as below:

	new_prot = static_protections(req_prot, address,
                                     1, pfn);


By the way, I just sent a empty mail to you. I am so sorry for it.

> > 
> > Thanks,
> > 
> > 	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ