From patchwork Tue Jun 27 15:09:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Lendacky X-Patchwork-Id: 9812415 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 C800B60351 for ; Tue, 27 Jun 2017 15:12:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A5EDB286FE for ; Tue, 27 Jun 2017 15:12:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 99ABE286D5; Tue, 27 Jun 2017 15:12:35 +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 A7741286D2 for ; Tue, 27 Jun 2017 15:12:34 +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 1dPs7t-00005F-QF; Tue, 27 Jun 2017 15:10:01 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dPs7s-0008UD-Nr for xen-devel@lists.xen.org; Tue, 27 Jun 2017 15:10:00 +0000 Received: from [85.158.137.68] by server-11.bemta-3.messagelabs.com id B5/7C-01732-84572595; Tue, 27 Jun 2017 15:10:00 +0000 X-Brightmail-Tracker: H4sIAAAAAA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messagelabs.com!1498576197!102770463!1 X-Originating-IP: [104.47.38.46] 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 30469 invoked from network); 27 Jun 2017 15:09:58 -0000 Received: from mail-bl2nam02on0046.outbound.protection.outlook.com (HELO NAM02-BL2-obe.outbound.protection.outlook.com) (104.47.38.46) by server-5.tower-31.messagelabs.com with AES256-SHA256 encrypted SMTP; 27 Jun 2017 15:09:58 -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=Cb7Cnk45YE4CGny+BMwNnx1Yi2OX97O0MbMSJqRe0Vq0BTR5Q2RwzUR4rkL3kj/Iabc0H13Qd8YzTO5PbEv2K+O2teys7pU+G8Y6IVlV/V2aUfAhw6HqCT9s27E7nNTX7gjhPBjVfn8lTvm/X8i6OnBSQZPaCWeIAj1YK1tlfGw= Received: from tlendack-t1.amdoffice.net (165.204.77.1) by DM5PR12MB1147.namprd12.prod.outlook.com (10.168.236.142) 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 15:09:51 +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 10:09:48 -0500 Message-ID: <20170627150948.17428.69974.stgit@tlendack-t1.amdoffice.net> In-Reply-To: <20170627150718.17428.81813.stgit@tlendack-t1.amdoffice.net> References: <20170627150718.17428.81813.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: BN6PR03CA0042.namprd03.prod.outlook.com (10.175.124.28) To DM5PR12MB1147.namprd12.prod.outlook.com (10.168.236.142) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5692962d-3741-490a-93c9-08d4bd6e9139 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)(300000506067)(300135500095); SRVR:DM5PR12MB1147; X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1147; 3:xAqDP+1zdODUnCiQ86VK/6SgLmrvlxZY8Etc3yHwNSudq2hfFGDp14YrZNc+OM7uGW18AWY3jJxldlBr/MtNVmKe0IpNS58XyBV3S2rWx79e9aB0x3zhRSKzRyK/+DVfdSZbA1j7njSMsG1IO5pg58hAK2vKC8Od1qnF5JM5lftJUw8JF+7+DbnQwtTGhBrZYIcgye7+zwkPKHRzC6ZXrZDb4A+HrGpGvV8lCT1by489SuJ3Gz3OLDoAmn9AAkIcg8uuymcJk6ts8epFSD8ZFxVkg060PKNOaY+KSCPNnJas5Xvm6vzjbcgPweQP+Zdj3SxS0w8hjbv32WFahHa++vgn64axvNK5Syk/ylYj5CNfggyxqadyTeoN4bhMltTZ1FiyOlWhshIAjMSx1aq8Y9tc+eN5bRDZJmO4qMhpl3F2+mchL/XSwpI5bLjG43whcxTZX4gBerVqJAiP8hevK/fc6Uq2Ow1HpHsk5hswns+uEZllVJEtuSInYV2WqbIi85XIpvcZ2neJcM4luFiAx9VQIErY+1+b9LWr9vzysG8FrVfn+JtPcvXqVtRCA2IU3yeUDTwjGADksMf4ZUkwrVKntWspqrFnlWi5dB+hqAciKvRIlz9yisT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PyEebsMD9loKubWz5eFg0w3YjyMIH8bI/jCBoSFRgyQi73TDXjdGmqHzgMUAV63ZV4PbhswXhwqSHZY643csaWCSSOoIKsjF15s1/6Y+CEG69lc4lZx3XOFgRx4VtGDKDU6HqU4VEvwt9kWrZ6kdl2/4SgmnYZsi6e2mCoN1iOzJHZzLnZYFbGwPF2Q70PR8XFdp1cIsZ+QeCNLUpqTX1EVg7zDQNa/3PyezZS6xnnz5kKkk/GHbi9sIkyiK+Unt58gRBuom9z1u8bofm5TzvJAYjIwqeLoZxz53G 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)(100000703101)(100105400095)(3002001)(93006095)(93001095)(10201501046)(6055026)(6041248)(20161123558100)(20161123555025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR12MB1147; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR12MB1147; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTVQUjEyTUIxMTQ3OzQ6QUJWZXpWZXRmZzFEcmdTVXhmdFg5MGJJT1Jn?= =?utf-8?B?K0Exb2NXNHl6OWs2WUtZMWZSTDBiajUvTGF2NGdlWUJwNHFJeUR3Y0hUQzJZ?= =?utf-8?B?TUsxOVpQbkg2RjBXajVPdEUwRzg5SDliQjVXVjBkVTZCaE0yQmdtRmVpNy9G?= =?utf-8?B?MGxPRHBkcTZIbGk2KzFxaXF6QzQ5eHBoRjVyNm0zL3RZenRTVE9qOWZCekNK?= =?utf-8?B?d2RwS0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RUxKVGkvak9BbTBIcHpWcjlybyszUGxNK3d2NkdKY0FscEZUNlVaaXo1SHA5?= =?utf-8?B?dWFKamZUdkFMcmV3YW5rekV4NENGS2JTbnVyU2xCNlZwRGVMemFxLzJDYmtR?= =?utf-8?B?L3NqS295WEpVWUdQQjZTT3BacjlFMmM3WFYxK1Rpb1ZaRmRtUFB1QXgwYUJj?= =?utf-8?B?Zm1SSnFremRjQ2J4clEycVJSQTdnWXc3UXpGNEthOThLWDFIelZ4Nnpta1cv?= =?utf-8?B?T2VLK3BkcGtYdk95cWZyOCtpanI4WEYrVUpJcXNYeGlXY0lnTWc4dDZHdXk1?= =?utf-8?B?eWpqMUpvQ2JDdjc0MHR1SThmRE0xNDZBakZzeTFFdkFyOU16SHZ4ckNqS05j?= =?utf-8?B?L0l1OFlQOWd3eFgzY2VEejR3TnlUb1JlRVF3M0JYbUU3b21Hb1FMcE0wL09k?= =?utf-8?B?RkR3Y3E0aGdndkppWVhYZ1Zkd2xKK1B4RlBPaSt3d1NKRWJ5NEd6VjNSalZZ?= =?utf-8?B?WWpWSWtDQlNNd2RtNzM1MXlBbklTVUxWeDZsRFFYK29jcGVaS3FzQzJ1Vzl1?= =?utf-8?B?OXVpYXkwOGQ0OUUxVXgxekFEWXdWRjhDdS9uNThsS0hqaFR3azdYRG43N09x?= =?utf-8?Q?7hAg6eeWSvlN5D44sGxgHbsgq64DLVdJBuRM=3D?= X-Forefront-PRVS: 0351D213B3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39850400002)(39400400002)(39450400003)(39410400002)(39860400002)(39840400002)(6116002)(230700001)(23676002)(5660300001)(50986999)(6506006)(76176999)(305945005)(3846002)(54356999)(55016002)(86362001)(2950100002)(575784001)(53936002)(7736002)(6666003)(42186005)(50466002)(83506001)(47776003)(7406005)(7416002)(8676002)(53416004)(9686003)(2906002)(54906002)(66066001)(4001350100001)(38730400002)(97746001)(81166006)(1076002)(110136004)(25786009)(4326008)(33646002)(478600001)(103116003)(189998001)(72206003)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR12MB1147; H:tlendack-t1.amdoffice.net; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTVQUjEyTUIxMTQ3OzIzOnE1LzNsL2pqKy90V21mR3lqY3hDMm01ckV4?= =?utf-8?B?ZnFobkQxbkt2cDU0VVVKR1ZZdmtPRDFqZDJWNkxTelArck5GN1g5VkI0eTJt?= =?utf-8?B?VUNubnllVU1COUk2ZFRDdWloeitjc09yaGhIajY5dldDQXlVb09sNVR5ajBV?= =?utf-8?B?cktML3pHVzJLTUQxSTdPT3h2MHhCcHdvV3l3aG9MVHBhWTA1S1pUWVkrditU?= =?utf-8?B?ZVhjalkyZGR1aXJvdWJ6OWM4R1NIVm5OZytLSVQ5RmZVbVV3Tnp6dHFyNUpn?= =?utf-8?B?RVNLOG1DTjRueFNvVmVyeGFXK3dtZEpNSHZzNmRoc1pCcWhFZVZpMWVtVWdW?= =?utf-8?B?c1duRVVvcUIyT25IaVBoVlQyYllGYVJKTzRjY1dGdVlIOGM3ZzlSTHZPa0Yw?= =?utf-8?B?QmVOWGxiV3gxOEx0SHp4Yk5KNXJGUkZRR0gyVG1RbUk5WnlRalI1UGY0Kyt3?= =?utf-8?B?ZlZKN0J5SnFpMm5BNXBjUXpTUEQ3b0hYQ2Ixc3ZBZTVxSWhIQTYrVGZIODVk?= =?utf-8?B?cDJBQnVIbllwVkI1Y0NBTGV0ajVyTS81Q1ZGRlJlTjFvOEo5Yk95ano5bzlV?= =?utf-8?B?T3VNQjgyRDhqR3ZhN09VU3ZEWnFzdVJ1YlIwL05XdUtpaGwvYXVXdWhDRk1U?= =?utf-8?B?RGJXM2szby8vNDhMUG9hdm9OcWxIQUd3Q0ozdHpQSlRmWFp4cUlLdk5ieCtW?= =?utf-8?B?Q0xHcXVLQUhYWGMrSjdwSTRzOHlMRzhVZHlQcjFUNXBNQ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OjaRnZLhoppw3biWiulBBlx+ZXUCIJU9GzqOtPaAnqsJiyLaRuZb9k1exEoKlJtdV7bQYamgvRL+1hNgHuQyrwRTkSK/9Y5vwIQKAl7hCq8OcGKGlg195wFpNJex5n7TVg2zYLnEX2cvtwMTeJTaXeAhxXviyQHxojXuFKlF2A4B0svEegCA= X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1147; 20:XOizygjcxGeh2oPObsjOV2zQLlnKTT1FVpNe9hhWbKmu5Hki20n09OKQrfmdYA67zmLyySriPMg7yztAKs0xPtoHnkp8lEGUb4oOj3/0YVZ35QYW68Mnt3UeiPr58EvW4VKQjS4OchnKEZgK9UgJiVgkM1StqE9xSGoDIb8jyivVYs6UvyxwErcH4T4HXhWTBunPs8nSdQGJH5hZJLJTVrYeMFsx80SbkByFG3WPIdxuaIu3C/pdOJx7i7IOVRiB X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jun 2017 15:09:51.8479 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1147 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 RESEND 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