]> www.infradead.org Git - users/jedix/linux-maple.git/commit
PTI: unbreak EFI old_memmap
authorJiri Kosina <jkosina@suse.cz>
Fri, 5 Jan 2018 19:21:38 +0000 (11:21 -0800)
committerKirtikar Kashyap <kirtikar.kashyap@oracle.com>
Fri, 12 Jan 2018 18:20:11 +0000 (10:20 -0800)
commit693b3d6fd677a0ff7206f9f4edb2e5eef1a89fdf
treea6d5d20dbfc023a2baf6843cf82859e3ae658de8
parentc3df6935134ae5ccd87f39f2567488c26491ede4
PTI: unbreak EFI old_memmap

old_memmap's efi_call_phys_prolog() calls set_pgd() with swapper PGD that
has PAGE_USER set, which makes PTI set NX on it, and therefore EFI can't
execute it's code.

Fix that by forcefully clearing _PAGE_NX from the PGD (this can't be done
by the pgprot API).

_PAGE_NX will be automatically reintroduced in efi_call_phys_epilog(), as
_set_pgd() will again notice that this is _PAGE_USER, and set _PAGE_NX on
it.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Orabug: 27333760
CVE: CVE-2017-5754
Signed-off-by: Pavel Tatashin <pasha.tatashin@oracle.com>
Signed-off-by: Kirtikar Kashyap <kirtikar.kashyap@oracle.com>
arch/x86/platform/efi/efi_64.c