[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <FFF73D592F13FD46B8700F0A279B802F485E101E@ORSMSX114.amr.corp.intel.com>
Date: Mon, 29 Oct 2018 07:26:30 +0000
From: "Prakhya, Sai Praneeth" <sai.praneeth.prakhya@...el.com>
To: Ingo Molnar <mingo@...nel.org>
CC: "linux-efi@...r.kernel.org" <linux-efi@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"x86@...nel.org" <x86@...nel.org>, Borislav Petkov <bp@...en8.de>,
"Andy Lutomirski" <luto@...nel.org>,
"Hansen, Dave" <dave.hansen@...el.com>,
"Bhupesh Sharma" <bhsharma@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
"Peter Zijlstra" <peterz@...radead.org>,
Ard Biesheuvel <ard.biesheuvel@...aro.org>
Subject: RE: [PATCH V2 1/2] x86/efi: Unmap EFI boot services code/data
regions from efi_pgd
> > +int kernel_unmap_pages_in_pgd(pgd_t *pgd, unsigned long address,
> > + unsigned long numpages)
> > +{
> > + int retval;
> > +
> > + /*
> > + * The typical sequence for unmapping is to find a pte through
> > + * lookup_address_in_pgd() (ideally, it should never return NULL
> because
> > + * the address is already mapped) and change it's protections.
> > + * As pfn is the *target* of a mapping, it's not useful while unmapping.
> > + */
> > + struct cpa_data cpa = {
> > + .vaddr = &address,
> > + .pgd = pgd,
> > + .numpages = numpages,
> > + .mask_set = __pgprot(0),
> > + .mask_clr = __pgprot(_PAGE_PRESENT | _PAGE_RW),
> > + .flags = 0,
> > + };
> > +
> > + retval = __change_page_attr_set_clr(&cpa, 0);
> > + __flush_tlb_all();
>
> So, just to clarify, 'pfn' is kept at 0 here? Might make sense to write it out
> explicitly like 'flags', even if it's not used by __change_page_attr_set_clr().
Sure! Makes sense. I will add it.
Regards,
Sai
Powered by blists - more mailing lists