Re: [tip:efi/core] x86/efi: Unmap EFI boot services code/data regions from efi_pgd
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [tip:efi/core] x86/efi: Unmap EFI boot services code/data regions from efi_pgd
- From: Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx>
- Date: Mon, 17 Dec 2018 20:35:37 +0100
- Cc: Ingo Molnar <mingo@xxxxxxxxxx>, "tglx@xxxxxxxxxxxxx" <tglx@xxxxxxxxxxxxx>, "x86@xxxxxxxxxx" <x86@xxxxxxxxxx>, "bp@xxxxxxxxx" <bp@xxxxxxxxx>, "marc.zyngier@xxxxxxx" <marc.zyngier@xxxxxxx>, "eric.snowberg@xxxxxxxxxx" <eric.snowberg@xxxxxxxxxx>, "hdegoede@xxxxxxxxxx" <hdegoede@xxxxxxxxxx>, "Hansen, Dave" <dave.hansen@xxxxxxxxx>, "peterz@xxxxxxxxxxxxx" <peterz@xxxxxxxxxxxxx>, "hpa@xxxxxxxxx" <hpa@xxxxxxxxx>, "arend.vanspriel@xxxxxxxxxxxx" <arend.vanspriel@xxxxxxxxxxxx>, "julien.thierry@xxxxxxx" <julien.thierry@xxxxxxx>, "bhsharma@xxxxxxxxxx" <bhsharma@xxxxxxxxxx>, "jonathanh@xxxxxxxxxx" <jonathanh@xxxxxxxxxx>, "joe@xxxxxxxxxxx" <joe@xxxxxxxxxxx>, "matt@xxxxxxxxxxxxxxxxxxx" <matt@xxxxxxxxxxxxxxxxxxx>, "torvalds@xxxxxxxxxxxxxxxxxxxx" <torvalds@xxxxxxxxxxxxxxxxxxxx>, "natechancellor@xxxxxxxxx" <natechancellor@xxxxxxxxx>, "luto@xxxxxxxxxx" <luto@xxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, "sedat.dilek@xxxxxxxxx" <sedat.dilek@xxxxxxxxx>, "zhuyifei1999@xxxxxxxxx" <zhuyifei1999@xxxxxxxxx>, "linux-tip-commits@xxxxxxxxxxxxxxx" <linux-tip-commits@xxxxxxxxxxxxxxx>
- In-reply-to: <FFF73D592F13FD46B8700F0A279B802F486045CA@ORSMSX114.amr.corp.intel.com>
- References: <20181129171230.18699-6-ard.biesheuvel@linaro.org> <tip-08cfb38f3ef49cfd1bba11a00401451606477d80@git.kernel.org> <FFF73D592F13FD46B8700F0A279B802F48604575@ORSMSX114.amr.corp.intel.com> <CAKv+Gu_vTHFxpKRu_CxKP-GdNdgdFKr7fi87VkNur0sqGQNVDw@mail.gmail.com> <FFF73D592F13FD46B8700F0A279B802F486045CA@ORSMSX114.amr.corp.intel.com>
On Mon, 17 Dec 2018 at 19:42, Prakhya, Sai Praneeth
<sai.praneeth.prakhya@xxxxxxxxx> wrote:
>
> > > Hi Thomas and Ingo,
> > >
> > > I recently noticed that the below commits [1] and [2] are broken when
> > > kernel command line argument "efi=old_map" is passed. Sorry! I missed
> > > to test this condition prior to sending these patches to mailing list.
> > > I am working on a fix and will send it to mailing list as soon as it's ready.
> > >
> >
> > Could you elaborate on the problem please?
>
> Sure! My bad..
>
> Little bit of history here:
> Boris with this patch set [1] introduced statically mapping EFI Runtime Services at -4G
> and also introduced "efi=old_map" to return to previous EFI functionality which used
> ioremap and __va(pa).
>
> [3] and [4] are links to old_map_region()
>
> The commit 08cfb38f3ef4 ("x86/efi: Unmap EFI boot services code/data regions from efi_pgd"),
> unmaps EFI boot services code/data regions *only* from efi_pgd but efi=old_map maps
> EFI boot services code/data regions into swapper_pgd. Also, efi=old_map uses either
> ioremap() or __va(md->phys_addr) to map EFI runtime/boot time services and doesn't use kernel_map_pages_in_pgd().
>
> So, we need a different unmapping routine to unmap EFI boot services code/data
> regions from swapper_pgd if they were mapped using efi=old_map.
>
For the short term, could we simply make your changes dependent on efi
!= old_map? That gives us some time to fix the old_map case properly.
[Index of Archives]
[Linux Stable Commits]
[Linux Stable Kernel]
[Linux Kernel]
[Linux USB Devel]
[Linux Video &Media]
[Linux Audio Users]
[Yosemite News]
[Linux SCSI]