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: "Prakhya, Sai Praneeth" <sai.praneeth.prakhya@xxxxxxxxx>
- Date: Mon, 17 Dec 2018 18:06:54 +0000
- Accept-language: en-US
- Cc: "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>, "Prakhya, Sai Praneeth" <sai.praneeth.prakhya@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>, "ard.biesheuvel@xxxxxxxxxx" <ard.biesheuvel@xxxxxxxxxx>, "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>
- Dlp-product: dlpe-windows
- Dlp-reaction: no-action
- Dlp-version: 11.0.400.15
- In-reply-to: <tip-08cfb38f3ef49cfd1bba11a00401451606477d80@git.kernel.org>
- References: <20181129171230.18699-6-ard.biesheuvel@linaro.org> <tip-08cfb38f3ef49cfd1bba11a00401451606477d80@git.kernel.org>
> Commit-ID: 08cfb38f3ef49cfd1bba11a00401451606477d80
> Gitweb:
> https://git.kernel.org/tip/08cfb38f3ef49cfd1bba11a00401451606477d80
> Author: Sai Praneeth Prakhya <sai.praneeth.prakhya@xxxxxxxxx>
> AuthorDate: Thu, 29 Nov 2018 18:12:24 +0100
> Committer: Ingo Molnar <mingo@xxxxxxxxxx>
> CommitDate: Fri, 30 Nov 2018 09:10:30 +0100
>
> x86/efi: Unmap EFI boot services code/data regions from efi_pgd
>
> efi_free_boot_services(), as the name suggests, frees EFI boot services
> code/data regions but forgets to unmap these regions from efi_pgd. This means
> that any code that's running in efi_pgd address space (e.g:
> any EFI runtime service) would still be able to access these regions but the
> contents of these regions would have long been over written by someone else.
> So, it's important to unmap these regions. Hence, introduce efi_unmap_pages()
> to unmap these regions from efi_pgd.
>
> After unmapping EFI boot services code/data regions, any illegal access by
> buggy firmware to these regions would result in page fault which will be handled
> by EFI specific fault handler.
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.
Meanwhile, could you please drop these patches before sending pull request to Linus?
[1] Commit 08cfb38f3ef4 ("x86/efi: Unmap EFI boot services code/data regions from efi_pgd")
[2] Commit 7e0dabd3010d ("x86/mm/pageattr: Introduce helper function to unmap EFI boot services")
Regards,
Sai
[Index of Archives]
[Linux Stable Commits]
[Linux Stable Kernel]
[Linux Kernel]
[Linux USB Devel]
[Linux Video &Media]
[Linux Audio Users]
[Yosemite News]
[Linux SCSI]