From patchwork Tue Jun 27 14:58:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Lendacky X-Patchwork-Id: 9812199 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2ED8160351 for ; Tue, 27 Jun 2017 15:01:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1AB0028645 for ; Tue, 27 Jun 2017 15:01:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0E443286D2; Tue, 27 Jun 2017 15:01:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EB837286C1 for ; Tue, 27 Jun 2017 15:01:10 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dPrxD-0003hN-8O; Tue, 27 Jun 2017 14:58:59 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dPrxB-0003g9-If for xen-devel@lists.xen.org; Tue, 27 Jun 2017 14:58:57 +0000 Received: from [193.109.254.147] by server-11.bemta-6.messagelabs.com id DB/85-03587-0B272595; Tue, 27 Jun 2017 14:58:56 +0000 X-Brightmail-Tracker: H4sIAAAAAA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534!109420568!1 X-Originating-IP: [104.47.34.69] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.19; banners=-,-,- X-VirusChecked: Checked Received: (qmail 60360 invoked from network); 27 Jun 2017 14:58:55 -0000 Received: from mail-by2nam01on0069.outbound.protection.outlook.com (HELO NAM01-BY2-obe.outbound.protection.outlook.com) (104.47.34.69) by server-3.tower-27.messagelabs.com with AES256-SHA256 encrypted SMTP; 27 Jun 2017 14:58:55 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=zT0b/N+8BqPeiRBpySQgljhyF94er171fXck5ykM5hQ=; b=dwkTtOB/mccGh+75zjDRez5i0U9bFTJPju3VV2F0BtB4kLJ/2yv/rHbVErvuZpK6r4A2/IhK+dwsHr0anGJL53Ip+/ezzCHqEiQSFrarmtZL7/wGBCXP1bw4BbqOk+yucTA7zUkoF7PGwg0iX6k3m4oxxNFv5cNHwFNjLerVClE= Received: from tlendack-t1.amdoffice.net (165.204.77.1) by BN6PR12MB1138.namprd12.prod.outlook.com (10.168.226.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1199.15; Tue, 27 Jun 2017 14:58:47 +0000 From: Tom Lendacky To: linux-arch@vger.kernel.org, linux-efi@vger.kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org, x86@kernel.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, xen-devel@lists.xen.org, linux-mm@kvack.org, iommu@lists.linux-foundation.org Date: Tue, 27 Jun 2017 09:58:44 -0500 Message-ID: <20170627145844.15908.49837.stgit@tlendack-t1.amdoffice.net> In-Reply-To: <20170627145607.15908.26571.stgit@tlendack-t1.amdoffice.net> References: <20170627145607.15908.26571.stgit@tlendack-t1.amdoffice.net> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: SN1PR19CA0006.namprd19.prod.outlook.com (10.163.220.16) To BN6PR12MB1138.namprd12.prod.outlook.com (10.168.226.140) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 61d5d3ad-2f60-4b65-3358-08d4bd6d04cc X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(48565401081)(300000503095)(300135400095)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095); SRVR:BN6PR12MB1138; X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1138; 3:qI9bzXJgSVo14UFmgO2equ5y6VKYCynqFsep5USZaSlMIvpKNUQrJp61tm7kOLfVk3ylrNVpJjEB2zcdTIpgaA3Dcp8js+Rsqn0GANaf/fF06SeuWdnZzoSzwvtB3iPzs76fQwtZ9KsF7ULYGfZX3UTMGfZ4+/dfMfcakzK6ZMw7eagVcfHY35F9H1MMNRS8zrKA4BcSwmRCkv3Sp4vkfOm1w0nhFiaHOknbwSBTKyE1XqY1mxrPyCju8GZdo3TJnJAaq4yud/EFzVwddWW4eNYd+r7ZFKEX71/K29SVlpmwruF7izGXTMZE4t17ydz9PnxYbweeccGdt9N6Sr2kSSGp0muA65+K6Aw/DpBBeay+OF1mZUaaRLCrqdFJZqvzq/HAa4gehP79VR5CC9G0AbVrtYeJS17geDSaNoB6qC1tSmXoWRZB4FU5xNT+fRggfYCr6QBgCsGLHVycxlo/mkg2xH1R/TJpVnLUs8foTVP3LkbmsWMXNYPFiAZXMlqNW9+H6ul8I24QE1ZY+vMyqVIubbUtWSHw7FqQLIozy9+ODgPFU2/L+7R71pbZ/DA3w609IfvVab8Hj2Ym8pL9qT09YkOVN+kdoO+l59arNROHRBkZXBhgSva9Nle+z7KXPRl3x9SpsaMXvDm4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DPzaqPVCFqPZ3G3AdxvxCMfLDb8KV07/R5yJu0xi3gOvHYwPY0qWyEnVyTBgNaEZCk/bHrKPiC2IJF1j4ekxaa9m4KhFnG9b3yR1mbmQ9BZH54I+bDgDDOlNaNtK7G+cZwdkXWP+UAo5k21mNy8Bk+7m8vfT52JSIy3k+8poigfskwQQSqY X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(133145235818549)(236129657087228)(767451399110)(148574349560750); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(6055026)(6041248)(20161123555025)(20161123562025)(20161123564025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR12MB1138; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR12MB1138; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjZQUjEyTUIxMTM4OzQ6WFllNHMxaUZlR2VaQmtxK1hqNHR0eGhWNitp?= =?utf-8?B?bHdweEp0ekNHdUFZMm9sNW9iNHhwZUFlbVBMb1QyLzk0SmplR0dieUl4clNq?= =?utf-8?B?Y2NyMFkzZnBoM3ZRd0dncU5KVzRDSTl6dHNxV0hHMHBLZnpwUEMzTEhjQ1V0?= =?utf-8?B?ZmZIRjFZOEFBYUd5YWpRZGkzU0w4RFdEOFJYZFg0U01obHpTdmNQWVRWSW1P?= =?utf-8?B?eFRDV2VJc09zb2FUWXhtcUtYdU13VlBRRVI4RGVlMDNpejBCMFdrRlNGRFVy?= =?utf-8?B?QlhaM2RTRUdBNkoyME51cEc3b2p5NHlrU0w5Y1dSOXpVYTBke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NEFCVUxKTzU2bmFiUk9WV0VOL2pEMkQ4?= =?utf-8?B?RjdibTV2a3A4d1pyeDBFWDlMRFRBb2tyY2loUStYNUhPdUFuWXRjZXk2VUxZ?= =?utf-8?B?alUzWGZIcFNrUjI1K29oNUtUVllvaXlZY0g1bUNxN3poSExxclQzVUdpYy9o?= =?utf-8?B?eEZ4NGppcGtxYlhjTjVoM2JtSXBqU0poTVVqQy8xZnBMTktVNFdpZFFlQnls?= =?utf-8?B?YjJ3MEkwa3dxZ2RMMFBHNjlkVmRxYVhqVmJWZ0xiTjZZbjFXdE1LeTgzMDdt?= =?utf-8?B?LzZRMjBUS2ZJOFJCRFovUnZoYWg4RWQ3NHhVMmtOMmNVZUVzY0hHLzU3ZTNI?= =?utf-8?B?djN4aDhGdWJYZkVHWEhjd1FHelQxMFZSckM4OVZhbkNzaWFoY0hEdnJJZjVo?= =?utf-8?B?UlNLdzJjWk9GWlk1TG0zQnllSU9YS1VrZU50N1Z3ejJmWU4xaSs2UzNCRHc3?= =?utf-8?B?cTZsbGlDUVJLaTlaTS8zZTk2L2NZZG16RG82SGJRSXRjc3dnd0gvczFHWUNa?= =?utf-8?Q?6itsqzadT6uuQ+OLi8Et5rx3ZKJ7nOMwWY+Y=3D?= X-Forefront-PRVS: 0351D213B3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39450400003)(39840400002)(39410400002)(39400400002)(39850400002)(39860400002)(2906002)(7406005)(230700001)(305945005)(81166006)(5660300001)(7416002)(4001350100001)(575784001)(50986999)(76176999)(23676002)(83506001)(97746001)(86362001)(8676002)(6666003)(54356999)(2950100002)(25786009)(53936002)(66066001)(50466002)(42186005)(33646002)(189998001)(47776003)(6116002)(3846002)(478600001)(1076002)(54906002)(9686003)(55016002)(4326008)(7736002)(72206003)(6506006)(110136004)(38730400002)(53416004)(103116003)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR12MB1138; H:tlendack-t1.amdoffice.net; FP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zpO48IeAgPdY3ANNR14YC6LyugyhxOdBcEeVpGWM8Z6w8+/Ixv3Z+W+JAoEwu56YSx2IzuAlrct/7BWHFpi3eY= X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1138; 20:JQcL8UBnGi7lWKwWIFvvoBKlZG1Q7w2dnZVltcl2YUBL5AutEygxd2nvfCCBeTd/ZwMEm6LKILhjOye+poW2iHpzya9yIZrQI5mWfJOBG3QOaXuFBAzxySs56qJvkwKQ5/JtkoZ1hYg1/ccedHFu8llWjUqfx9aHbGiY5NxvGD/MVJtR7gANo3svAMkLJIfH38GlCaN9F8f4zLGEGfLUkyl2hMpQBpQSysE814cKReijI8gDbXeyM0MIHSsUZAsC X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jun 2017 14:58:47.9721 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1138 Cc: Brijesh Singh , Toshimitsu Kani , "Michael S. Tsirkin" , Matt Fleming , Alexander Potapenko , "H. Peter Anvin" , Boris Ostrovsky , Jonathan Corbet , Joerg Roedel , Radim =?utf-8?b?S3LEjW3DocWZ?= , Larry Woodman , Ingo Molnar , Andrey Ryabinin , Dave Young , Rik van Riel , Arnd Bergmann , Borislav Petkov , Andy Lutomirski , Thomas Gleixner , Dmitry Vyukov , Juergen Gross , Paolo Bonzini Subject: [Xen-devel] [PATCH v8 14/38] x86/mm: Insure that boot memory areas are mapped properly X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 --- arch/x86/include/asm/mem_encrypt.h | 6 +++ arch/x86/include/asm/pgtable.h | 3 ++ arch/x86/kernel/head64.c | 30 +++++++++++++++-- arch/x86/kernel/setup.c | 9 +++++ arch/x86/mm/kasan_init_64.c | 2 + arch/x86/mm/mem_encrypt.c | 63 ++++++++++++++++++++++++++++++++++++ 6 files changed, 108 insertions(+), 5 deletions(-) diff --git a/arch/x86/include/asm/mem_encrypt.h b/arch/x86/include/asm/mem_encrypt.h index 8baa35b..ab1fe77 100644 --- a/arch/x86/include/asm/mem_encrypt.h +++ b/arch/x86/include/asm/mem_encrypt.h @@ -26,6 +26,9 @@ void __init sme_early_encrypt(resource_size_t paddr, void __init sme_early_decrypt(resource_size_t paddr, unsigned long size); +void __init sme_map_bootdata(char *real_mode_data); +void __init sme_unmap_bootdata(char *real_mode_data); + void __init sme_early_init(void); void __init sme_encrypt_kernel(void); @@ -40,6 +43,9 @@ static inline void __init sme_early_encrypt(resource_size_t paddr, static inline void __init sme_early_decrypt(resource_size_t paddr, unsigned long size) { } +static inline void __init sme_map_bootdata(char *real_mode_data) { } +static inline void __init sme_unmap_bootdata(char *real_mode_data) { } + static inline void __init sme_early_init(void) { } static inline void __init sme_encrypt_kernel(void) { } diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index c6452cb..bbeae4a 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h @@ -23,6 +23,9 @@ #ifndef __ASSEMBLY__ #include +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_checkwx(void); diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c index 5cd0b72..0cdb53b 100644 --- a/arch/x86/kernel/head64.c +++ b/arch/x86/kernel/head64.c @@ -34,7 +34,6 @@ /* * Manage page tables very early on. */ -extern pgd_t early_top_pgt[PTRS_PER_PGD]; extern pmd_t early_dynamic_pgts[EARLY_DYNAMIC_PAGE_TABLES][PTRS_PER_PMD]; static unsigned int __initdata next_early_pgt; pmdval_t early_pmd_flags = __PAGE_KERNEL_LARGE & ~(_PAGE_GLOBAL | _PAGE_NX); @@ -181,13 +180,13 @@ static void __init reset_early_page_tables(void) } /* Create a new PMD entry */ -int __init early_make_pgtable(unsigned long address) +int __init __early_make_pgtable(unsigned long address, pmdval_t pmd) { unsigned long physaddr = address - __PAGE_OFFSET; pgdval_t pgd, *pgd_p; p4dval_t p4d, *p4d_p; pudval_t pud, *pud_p; - pmdval_t pmd, *pmd_p; + pmdval_t *pmd_p; /* Invalid address or early pgt is done ? */ if (physaddr >= MAXMEM || read_cr3_pa() != __pa_nodebug(early_top_pgt)) @@ -246,12 +245,21 @@ int __init early_make_pgtable(unsigned long address) memset(pmd_p, 0, sizeof(*pmd_p) * PTRS_PER_PMD); *pud_p = (pudval_t)pmd_p - __START_KERNEL_map + phys_base + _KERNPG_TABLE; } - pmd = (physaddr & PMD_MASK) + early_pmd_flags; pmd_p[pmd_index(address)] = pmd; return 0; } +int __init early_make_pgtable(unsigned long address) +{ + unsigned long physaddr = address - __PAGE_OFFSET; + pmdval_t pmd; + + pmd = (physaddr & PMD_MASK) + early_pmd_flags; + + return __early_make_pgtable(address, pmd); +} + /* Don't add a printk in there. printk relies on the PDA which is not initialized yet. */ static void __init clear_bss(void) @@ -274,6 +282,12 @@ static void __init copy_bootdata(char *real_mode_data) char * command_line; unsigned long cmd_line_ptr; + /* + * If SME is active, this will create decrypted mappings of the + * boot data in advance of the copy operations. + */ + sme_map_bootdata(real_mode_data); + memcpy(&boot_params, real_mode_data, sizeof boot_params); sanitize_boot_params(&boot_params); cmd_line_ptr = get_cmd_line_ptr(); @@ -281,6 +295,14 @@ static void __init copy_bootdata(char *real_mode_data) command_line = __va(cmd_line_ptr); memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE); } + + /* + * The old boot data is no longer needed and won't be reserved, + * freeing up that memory for use by the system. If SME is active, + * we need to remove the mappings that were created so that the + * memory doesn't remain mapped as decrypted. + */ + sme_unmap_bootdata(real_mode_data); } asmlinkage __visible void __init x86_64_start_kernel(char * real_mode_data) diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 65622f0..31ae85e 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -69,6 +69,7 @@ #include #include #include +#include #include #include