From patchwork Fri Jun 16 18:52:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Lendacky X-Patchwork-Id: 9793259 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 D44DF60325 for ; Fri, 16 Jun 2017 18:54:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C6B9E2865B for ; Fri, 16 Jun 2017 18:54:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BA5E128670; Fri, 16 Jun 2017 18:54:49 +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 633D12865B for ; Fri, 16 Jun 2017 18:54:48 +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 1dLwMP-0002IX-Ca; Fri, 16 Jun 2017 18:52:45 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dLwMN-0002H7-RF for xen-devel@lists.xen.org; Fri, 16 Jun 2017 18:52:44 +0000 Received: from [85.158.137.68] by server-5.bemta-3.messagelabs.com id A1/B8-02199-BF824495; Fri, 16 Jun 2017 18:52:43 +0000 X-Brightmail-Tracker: H4sIAAAAAA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497639160!105344082!1 X-Originating-IP: [104.47.40.70] 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 53393 invoked from network); 16 Jun 2017 18:52:41 -0000 Received: from mail-co1nam03on0070.outbound.protection.outlook.com (HELO NAM03-CO1-obe.outbound.protection.outlook.com) (104.47.40.70) by server-10.tower-31.messagelabs.com with AES256-SHA256 encrypted SMTP; 16 Jun 2017 18:52:41 -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=kgJHZxUsHRVrOkWMz0N36h2l68P4+omoL/CLpc7L8Pc=; b=zW3TLIaW9QS1j7A3a0RjIkBFEWfycWoCQwjpWQLy3x2XazjZj4peONh0dhYQJ3e4BDHUlQxf8T7cli6eblg1260obZsA7HL4AFSJRLm3ZbxcTk5q+r3x+ZJ7yAdpQANYkhB/wjhfWMw02gwyUO22q5cE4l6quFgoQVJPXuNKq+A= Received: from tlendack-t1.amdoffice.net (165.204.77.1) by CY4PR12MB1141.namprd12.prod.outlook.com (10.168.163.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1157.12; Fri, 16 Jun 2017 18:52:34 +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: Fri, 16 Jun 2017 13:52:32 -0500 Message-ID: <20170616185232.18967.61753.stgit@tlendack-t1.amdoffice.net> In-Reply-To: <20170616184947.18967.84890.stgit@tlendack-t1.amdoffice.net> References: <20170616184947.18967.84890.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: BN6PR17CA0002.namprd17.prod.outlook.com (10.173.147.12) To CY4PR12MB1141.namprd12.prod.outlook.com (10.168.163.149) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PR12MB1141: X-MS-Office365-Filtering-Correlation-Id: 06a5a266-1b6f-4e44-fe1c-08d4b4e8dbef X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(201703131423075)(201703031133081); SRVR:CY4PR12MB1141; X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1141; 3:Gc57IBZ11kXgVKzMbYqmWEmxM0f15UZLLW++8qv+6+sXgcz0Z6TneXDu+0N+LzX4V76Xi0cNbQrPTCOY9IZKhRkTgGUWZHLWF/7IUjyZJFGIL+dRRIFqjtSi5JwZcMJDKZqx5E0MKaOJAkob8tjcONzpVOlk3QANpThysYRN74HbeYMbrjJuiChIIjJydmCFVgV/yWw0ndabU4C06Li5/AzJ4SvNlGdZO49R73GpxyeSUKzec7aw6y/ac7gSUdgjXzUimhq85zXHR+GdZj+MexY8tl9Nva35mhHpOW5DAwaF1wEEH/jj5qsOaLNGtrQjnEBoVEQl65iqJzxEuSQWNq2jyGV/Yp/cE3FqtIHnomU=; 25:k2ZkP0ypDilkV8C9jULqA7RkoOfaoDkbmPHHxcm2JzoMopQ3t7mdqSf8xOf2lgZXASmmyUMDGHgE7zApIwYerTWSEKOab8IpavH5qxEKIEyZyLqO/ixCC/6Bd9VWybcWHJozHpNy5mnkgUPLKqVDpx00K1KesXNj1JhrykMVnXbngMOSbKf3H8mhDzRyXyRD6eHAj/2v1ZmyL5uQUSzoxPxnlsjFG5MAtGW6zXxCnxZwWnnp8JLrI2I7ShnkbNH4KKtPfAYabYWZ25w+KMPKpd8v5AHYmSndKRpsQRlmg+UXaNl9DbG7jVmqPnmfkIyXGcUwo3kscn+UVRH6wWH17Pl+RiRlfB5xCPE98Edt7oFGCCoEKmK9cjuGfUDym8ySlPzidgy9mOdpYvVWO3c3jVjU8rBuz1GnBr5GcmCjllAhq+lLK80wR6CtpxQFvAFEzFOHLQcHZB3k1B85bCO6ZnxBAbDVYiPGlNrQerf2lOY= X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1141; 31:xt3lD1fAuzdIJEIVCuppqtlfr2sZKqQf7Jz7ruqilRrbNxZUaqdw6hpiTxqpP1LS9rzNjBuQTKQexbK7vQMKI5bDW6ORciIfkra2eicfceTvbf9Q7pgsntd+6b/e4JGXU8ZwB4kHXJme/zpxdKnWU86q7a34cgSNpFynRjoepJUJQl0z9aqPJc+UvII0uzLsSjRfMiQ3FpJMcXCTvC/5UEsH3Pfh2UekFnuje3Kcydg=; 20:R6mdEuJfK0eoMGvIvmkRGZ01CNIO5QD6JIivl6Bc5DZ9euEGHE8f4iurJ3S1BmieonQ0h36XS8sYGw10q+vtL4r0OBe9n3bqn55P511XtsFARUgxXlZuuZtSMEqcLa5lwI7iRSGXnHmoAzdtKVdtHF/bHuAmi4RtQ2oyArYPguRC7akCZwgwnyKAuavPCmITLDVjdZrWocazwmXg+l08nC/0gMBDxDfqOmPHL/b+zvLeUF3PrRPW2Vp29DSzU7wfdEYoeayi8kk3umb7biiViREhjlCI/nx0K1V+CH/btePzl9omfoCiNRmLG3gHVuEWdGthkVYwA8ST46W5/TERXJcaXiQ4cQaTi2I861yhpuu3Liw7mXOZwtISOim9eAfIWgkLr1A1a9fmBFeEjY1YjxS7CthnSUObpNCaLZ73tggaF64BN4awMD7BFXQD0+RGIaZly/NMdTc5rSZfK+50P8HrWfAX0xIpoeBu9MNbCIc9NWHfVt9pE+ejF3S90EVj X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(100000703101)(100105400095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123562025)(20161123560025)(20161123564025)(20161123555025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR12MB1141; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR12MB1141; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTRQUjEyTUIxMTQxOzQ6UUlkUzUzZm5qUmJ3ZFpXaWpUM3lzOGJJcFo3?= =?utf-8?B?ZmkvTmxjY0FHMW9uZVIzVHRRSXJmNDRBVFJCMFc4MmZWTHpldkphV2ZKYzJS?= =?utf-8?B?SHFNNmUwbitrUkQwV2ZSTCs0OWN2QWdrMXNUeFZNMUQ4QmVjV0VxM1BLcmpx?= =?utf-8?B?ZG9mc2JtcHJ4UDB6Qm4rZDdaS1lhaWlPaXNoZlgwcDZHdFVVcUFCRXpBNzl5?= =?utf-8?B?MG9ucWhsS2E1eDdyNEZTNkY0YSs0NFZvTlNoWUJ0Nk9GNFpyTXRncnF5MXhK?= =?utf-8?B?a2FwSXB3RTZVblRTMVZNWEZrVmUyMENvYVFaSHh1aHJGK3c1N2VaNDVRRjZE?= =?utf-8?B?Z25rTlBpdithTERvRE9yVnhqSG9Xcno3L21DcUhGSXdtdElNL0ZhZDZoT0tT?= =?utf-8?B?VnhQSGx1WWVtYi8zY0hZbVRoRElQN0dtaHBLcXJmRFArMkhWRWpYUjQxQWxt?= =?utf-8?B?R1g2N2lKczZUK2ZzR0J6aTVaUGF3RDNrKzErdnViNjZCYUNpVldpWGVubHd4?= =?utf-8?B?aGJGVFhtdy9ncW55ZThKdjFHei9HOThFbGRFOGhUL0M2SHFBelFoNlM0dk5F?= =?utf-8?B?VDZZMkp5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Rq?= =?utf-8?B?MWdrdk91aTROV2loVmM0ekpoUHA0YmlNNVJQQjB2dDdiRHFyMWNna3prbThM?= =?utf-8?B?aGNwZG9EbWw2NGE4UWsvRnp2WmVIL0s3TFRLVEcwWmlzb0xTeGR2QzFLR2ZD?= =?utf-8?Q?Djw7FVp9NlWE82o1ROq?= X-Forefront-PRVS: 0340850FCD X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39850400002)(39410400002)(39860400002)(39400400002)(39840400002)(39450400003)(2906002)(23676002)(33646002)(103116003)(2950100002)(230700001)(9686003)(66066001)(3846002)(6116002)(47776003)(72206003)(53936002)(42186005)(53416004)(55016002)(50466002)(7406005)(54906002)(7416002)(38730400002)(110136004)(478600001)(8676002)(81166006)(575784001)(86362001)(76176999)(6506006)(50986999)(305945005)(54356999)(4001350100001)(1076002)(5660300001)(7736002)(4326008)(83506001)(25786009)(189998001)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR12MB1141; H:tlendack-t1.amdoffice.net; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTRQUjEyTUIxMTQxOzIzOkRuZTBuNWwxa3NEK2pBbkY3SVJKYWFvZTZU?= =?utf-8?B?d1YrdGg1ektVOWoxdWIvdys1aE42YytJUVdzSlVhWTFpemJGZkF3d2ZpbEE2?= =?utf-8?B?ZmdFRTYza1dCRHV6Sk5DNHl1WG1wT2p0QURNallUdTRCeHUxQVZmaHhIanJ1?= =?utf-8?B?T08rOVZaQ2VnMTZrS24wTVBRTTdkQVVITHdtVjZBWnFNeDVHU292cThWT3BK?= =?utf-8?B?VXNDbjUxMmdpNUpwM3lvQXlLWi9Ec21pVXIrK0lDMlRkNnhTazVSb05BbHdq?= =?utf-8?B?K0VjeDUwYVhTZ3l3OWpYeWUrREVFQUZ3REhhdGt4Y25ub2lOREZ0cEMxZVN6?= =?utf-8?B?eDBaT0VYTkZnZlBucGp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ljg98cOlti+3TXfif2wHmGpfaMzBmtLC+0pPzXqn+e5Kh/qqj+vOcov7FaNxQTe8i/b2ibVBZfsBI/+1+lh9O3U0ANkzucAlT/joHejDxwA5u5RmFFiyPMp9Ek6+MhHg1T/sdTq3OqCJGYXP0cB6e6YD8mcNRigFPVICyCN9TYUAgPIL1U0Q5JmK+cTC7PfYOnSCKV7rYx6hT7mXlu3KIcQ4vqkN9D1GUgXZ8NhsSJRNHSNsIYNTaM6bqPoEjEUvUQctpq0M63JDiICPGVeX8qlDIyAGre3MIVv2M3CxITxhUrl5atey/sTztvbMjoV/DSOa+4nW0Tl9pDzIqES1GouEqHsG9QsXPl960llj+o7274MJOe0igOPxU2jYpoO6atn/mjrZBHaNF2iwHAPbU0eXASC1yuynhWg8Nhmv8r9vSBOI4kaWk1k34A932eo8oAwKGZr/qWJdVavFcskyBxNPcMw9WoDqXFwjclMa1cSXEvC1M/SgP8H0oI73bsI7xGYJSXsP4ph0vl5a7t5mQI/eg4A+0i4wMltZOXiHeDkeHqERv2WBLXPwOp0tUlX44r/PM7kJkbVarHbjgLtXmFMxdugynuwva5886zf1GzIodc4= X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1141; 20:uTITu8CE48UYSw13qNMK7sEXdYI43QCJg1ZHNMpddk/UMiyraLIS3rPSr9bIhINXsmc/ij6sP2slc3oljJzcMTE4PhcgUylsYWLACQjKAd8AUC3WwauWKAuoIszcEs7WRV3Dz8v+LJM85fEiM3/fwLNBprsaZ3WBJmFyfRB60HrTy9b07/TOf5EFddPoPWMzBRao1Qmt6FPigCBwamuUxK/f6lSWr8luV0hnchrNWa1Abvg8SInXHZttOsEgyB8j X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2017 18:52:34.7114 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1141 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 v7 14/36] 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 | 70 ++++++++++++++++++++++++++++++++++++ 6 files changed, 115 insertions(+), 5 deletions(-) diff --git a/arch/x86/include/asm/mem_encrypt.h b/arch/x86/include/asm/mem_encrypt.h index 6508ec9..3ffa5fa 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_enable(void); @@ -39,6 +42,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_enable(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 5d7363a..9e94ed2 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); @@ -161,13 +160,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)) @@ -226,12 +225,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) @@ -254,6 +262,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(); @@ -261,6 +275,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 f818236..6a2f0a8 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -69,6 +69,7 @@ #include #include #include +#include #include #include