diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71-e3000/0044-x86-mm-Insure-that-boot-memory-areas-are-mapped-prop.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71-e3000/0044-x86-mm-Insure-that-boot-memory-areas-are-mapped-prop.patch | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71-e3000/0044-x86-mm-Insure-that-boot-memory-areas-are-mapped-prop.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71-e3000/0044-x86-mm-Insure-that-boot-memory-areas-are-mapped-prop.patch new file mode 100644 index 00000000..1556de93 --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71-e3000/0044-x86-mm-Insure-that-boot-memory-areas-are-mapped-prop.patch @@ -0,0 +1,76 @@ +From ecf8d81ff98e04cce37a8d4453c58a2f0d0b818a Mon Sep 17 00:00:00 2001 +From: Sudheesh Mavila <sudheesh.mavila@amd.com> +Date: Mon, 13 Aug 2018 13:02:46 +0530 +Subject: [PATCH 44/95] x86/mm: Insure that boot memory areas are mapped + properly +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From b9d05200bc12444c7778a49c9694d8382ed06aa8 +The boot data and command line data are present in memory in a decrypted +state and are copied early in the boot process. The early page fault +support will map these areas as encrypted, so before attempting to copy +them, add decrypted mappings so the data is accessed properly when copied. + +For the initrd, encrypt this data in place. Since the future mapping of +the initrd area will be mapped as encrypted the data will be accessed +properly. + +Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> +Reviewed-by: Thomas Gleixner <tglx@linutronix.de> +Cc: Alexander Potapenko <glider@google.com> +Cc: Andrey Ryabinin <aryabinin@virtuozzo.com> +Cc: Andy Lutomirski <luto@kernel.org> +Cc: Arnd Bergmann <arnd@arndb.de> +Cc: Borislav Petkov <bp@alien8.de> +Cc: Brijesh Singh <brijesh.singh@amd.com> +Cc: Dave Young <dyoung@redhat.com> +Cc: Dmitry Vyukov <dvyukov@google.com> +Cc: Jonathan Corbet <corbet@lwn.net> +Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> +Cc: Larry Woodman <lwoodman@redhat.com> +Cc: Linus Torvalds <torvalds@linux-foundation.org> +Cc: Matt Fleming <matt@codeblueprint.co.uk> +Cc: Michael S. Tsirkin <mst@redhat.com> +Cc: Paolo Bonzini <pbonzini@redhat.com> +Cc: Peter Zijlstra <peterz@infradead.org> +Cc: Radim Krčmář <rkrcmar@redhat.com> +Cc: Rik van Riel <riel@redhat.com> +Cc: Toshimitsu Kani <toshi.kani@hpe.com> +Cc: kasan-dev@googlegroups.com +Cc: kvm@vger.kernel.org +Cc: linux-arch@vger.kernel.org +Cc: linux-doc@vger.kernel.org +Cc: linux-efi@vger.kernel.org +Cc: linux-mm@kvack.org +Link: http://lkml.kernel.org/r/bb0d430b41efefd45ee515aaf0979dcfda8b6a44.1500319216.git.thomas.lendacky@amd.com +Signed-off-by: Ingo Molnar <mingo@kernel.org> + +Signed-off-by: Sudheesh Mavila <sudheesh.mavila@amd.com> +--- + arch/x86/include/asm/pgtable.h | 3 +++ + arch/x86/mm/mem_encrypt.c | 0 + 2 files changed, 3 insertions(+) + mode change 100644 => 100755 arch/x86/mm/mem_encrypt.c + +diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h +index 6a4b1a5..dbf9fc7 100644 +--- a/arch/x86/include/asm/pgtable.h ++++ b/arch/x86/include/asm/pgtable.h +@@ -27,6 +27,9 @@ + extern pgd_t early_top_pgt[PTRS_PER_PGD]; + int __init __early_make_pgtable(unsigned long address, pmdval_t pmd); + ++extern pgd_t early_top_pgt[PTRS_PER_PGD]; ++int __init __early_make_pgtable(unsigned long address, pmdval_t pmd); ++ + void ptdump_walk_pgd_level(struct seq_file *m, pgd_t *pgd); + void ptdump_walk_pgd_level_debugfs(struct seq_file *m, pgd_t *pgd, bool user); + void ptdump_walk_pgd_level_checkwx(void); +diff --git a/arch/x86/mm/mem_encrypt.c b/arch/x86/mm/mem_encrypt.c +old mode 100644 +new mode 100755 +-- +2.7.4 + |