lkml.org 
[lkml]   [2013]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/4] x86, cpa: Map in an arbitrary pgd
On Thu, 06 Jun, at 03:24:06PM, Borislav Petkov wrote:
> On Thu, Jun 06, 2013 at 11:22:33AM +0100, Matt Fleming wrote:
> > > @@ -697,7 +714,10 @@ static int __change_page_attr(struct cpa_data *cpa, int primary)
> > > else
> > > address = *cpa->vaddr;
> > > repeat:
> > > - kpte = lookup_address(address, &level);
> > > + if (cpa->pgd)
> > > + kpte = __lookup_address_in_pgd(cpa->pgd, address, &level);
> > > + else
> > > + kpte = _lookup_address_cpa(cpa, address, &level);
> >
> > Don't you also need to initialise .pgd in __set_pages_p() and
> > __set_pages_np()?
>
> Hmm, I don't think so. The idea is to leave the current functionality in
> pageattr.c untouched. Currently, it maps PTEs in init_mm.pgd by default
> because this is the kernel PGD.

I meant because the .pgd member is uninitialised and contains garbage.

--
Matt Fleming, Intel Open Source Technology Center


\
 
 \ /
  Last update: 2013-06-06 16:21    [W:0.091 / U:2.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site