From patchwork Tue Jun 27 15:13:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Lendacky X-Patchwork-Id: 9812501 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 02B72603D7 for ; Tue, 27 Jun 2017 15:16:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E8569286BC for ; Tue, 27 Jun 2017 15:15:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DBCDB286CA; Tue, 27 Jun 2017 15:15:59 +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 5175F286D4 for ; Tue, 27 Jun 2017 15:15:59 +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 1dPsBa-000374-1w; Tue, 27 Jun 2017 15:13:50 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dPsBZ-000366-1i for xen-devel@lists.xen.org; Tue, 27 Jun 2017 15:13:49 +0000 Received: from [193.109.254.147] by server-7.bemta-6.messagelabs.com id 9D/CB-03620-C2672595; Tue, 27 Jun 2017 15:13:48 +0000 X-Brightmail-Tracker: H4sIAAAAAA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!1498576425!100190924!1 X-Originating-IP: [104.47.32.66] 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 51727 invoked from network); 27 Jun 2017 15:13:46 -0000 Received: from mail-sn1nam01on0066.outbound.protection.outlook.com (HELO NAM01-SN1-obe.outbound.protection.outlook.com) (104.47.32.66) by server-13.tower-27.messagelabs.com with AES256-SHA256 encrypted SMTP; 27 Jun 2017 15:13:46 -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=145XOjQZSUFpv36M8kSskINVUgW809aH/LMvzdlGees=; b=NcIpE5srqANvM9ddaTrc904pACpLGkyQVW/5iskvVYrHDtJDWYBKEjVRuJZl8+tQoAiD1kSAtqaMMn7k7nJrdSQ8kqN7pq6ffgvbowYdFp2gMB+DPZUP72DDm/xuhEWb3YLoV9U+oPmxCDnn8iZu5LQ3fpxfwtf9Oakow851akw= Received: from tlendack-t1.amdoffice.net (165.204.77.1) by MWHPR12MB1150.namprd12.prod.outlook.com (10.169.204.14) 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:13:41 +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:13:38 -0500 Message-ID: <20170627151338.17428.47553.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: DM5PR1101CA0009.namprd11.prod.outlook.com (10.174.246.19) To MWHPR12MB1150.namprd12.prod.outlook.com (10.169.204.14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 401b4877-d6ed-45c9-1926-08d4bd6f19aa 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:MWHPR12MB1150; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1150; 3:j8eMm7HsJAt2yi4cIg8hSZ+1YBxsMUB6EkTN0TdzX1Wh+jQG3gt5tk+bW0EuYaPWXtA8m+hIn5gKDaiAdUY3DOVYSNgmnLTNbWM4RjJs5y5q2A8ElvIh4lLIMKAK9HrzBtEbjspPZOynPCtN7cJ99MPHHEsaijQLxHAIS/L0iAjgCHcKZQwMTV2D+g17d9jEUruNEQsomqbTNAk5LAdvuhDRdV904pW4emUm0NmoPYhMapbAW0Mp1EX1neJ3UdM+qPp+tiMM9DonRRa1UAbKanFGmHJCyXnACk1wO8jYqPWIVEKBE79m0oDAb8OlNXhd31xN2i0TyHMbMdxes6oeZFpqnAAyQSALOMd5rJwkJz01LneuR0Bzp9gdajcH1XoJJ5gas62PqmwNDw52yf/UMc/klFasDdDDkvpZsu/AN6cNzFybLq1u8HNDq5ap7tsIvHaPIDG1nI/BN16GJl437FjmP0gdBosHNc7exNUg0SMevycfXEqYeuPlAvQg6qACL+zE8FtWdZPfPT22HSn795blxAEpMx81U/rZvrHxYgJqR3AkGCTAO7hDHZ1Ug1IGu8DE7PXg+VQfPPoQi58QaikfhGkAlH4sSa2c1huEpGNhlJ9fPFAUj4yomxz9EZZn32cP3eq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UFUONAbVwBSOJjELlmLn3AQdYhA5cMwkIosCaYkJnGfVjwNzYx5Xi6RICChNqxIE4j/PLRt6hSbtqv1hyxuUG/fDb1c0Sc8R/GhbSmWaBlU+9SlZPGqVa1JufkErl0jhF/AiHOcN6aoMXAMdhkh2iibEU33/4p3Z7Kmm2J0H2lxuDFNQhL/9883tALAPFIBkVSEKXp6rtyrUkDpOwwxqQJdfWoffTv3v5o5UQSpqjLTY9voKxiPWEtLdJNivEr1I8iZ0H X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236129657087228)(767451399110)(148574349560750)(167848164394848); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(3002001)(6055026)(6041248)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123562025)(20161123555025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR12MB1150; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR12MB1150; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtNV0hQUjEyTUIxMTUwOzQ6bytYTlB1QjdjZGNvSEZpSTVHWkIxSXdtTGE3?= =?utf-8?B?clV6UWFvSnFnSmRUYXFvZXYxdTd0amIyRjBGbW5SLzVsZ0czSitubk12WWda?= =?utf-8?B?U0xEZnVvSHR4WGdEc3lpS2t4OUtwU2pJWE5ITitkeUc0SDE1WXM1a1U3Y3Iv?= =?utf-8?B?Tk0zbzVkQ1NkUENhWDFGV0VWZ2VZWHQzMjc0a2N3UVhVdlZuOGFsZ0xkNEUz?= =?utf-8?B?VEl1MHVkUWh5QTU5bTdjZG9pMVNtTWtJcm4zVX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tVzhmaE9vMmpwYkE2a0JtVTBvTk9oTytxS1lrbnpSU0IvZ01h?= =?utf-8?B?ZWVWRVQyR25qTVBnT1ExSkZCL0JOT1NLNXVvb3ZIcngweld3RkQ3Mm8rQjVm?= =?utf-8?B?NElaSGxYVmhxZElQbSs1UzhiaFlDdTJVcldZQjVTaHpVS2tHL3oyQmhyeVFL?= =?utf-8?B?Nk5IdG1kbmJFVGR5d3U1V2RjbTV1TWxtUVJsSFpOb1VyUFpRY2RTT2JwRmk0?= =?utf-8?B?T2VTckdiTFJweEVhTU0wRkVPWm5mWjZ5dW02NFQyNVBVTXVRRUI0cm8ySmRv?= =?utf-8?B?dnFPSURVQmN0R3ByWWQ0TzVqZEUvb1NoQUlWVTZDK0pyM2l1OGRIQnpaT1RR?= =?utf-8?B?REdxcENqdzNUWDhGRXNhU1I0dUNzL2twSlg1OFFRWXFHeE52T1FmbmZ5dm9t?= =?utf-8?B?RTQ2YWpjY3p4YWw0bnRhK0NyTTFNb2krWStOb0xXSk81WHlGMTIyZGdiTHNs?= =?utf-8?B?cU13ZlQ1OE1MYnBLem1pbjZZR0tIWkRNM1BNanJremJvY1k1Y2JmRWFJSDlp?= =?utf-8?B?NFpWTmZQbXg0aFFSZnJMK3VtYnNxbHNMTHpSTmF2NC9HcHI3NUplSlVDczM0?= =?utf-8?Q?PdaGStVjRqKc0XP/ooZghCPET6SHTLzvmFYs=3D?= X-Forefront-PRVS: 0351D213B3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39410400002)(39860400002)(39450400003)(39840400002)(39400400002)(39850400002)(4001350100001)(42186005)(110136004)(2950100002)(6506006)(6666003)(103116003)(38730400002)(189998001)(86362001)(97746001)(55016002)(54906002)(5660300001)(7406005)(305945005)(81166006)(7416002)(8676002)(53936002)(4326008)(9686003)(7736002)(83506001)(478600001)(72206003)(2906002)(66066001)(23676002)(25786009)(54356999)(76176999)(47776003)(53416004)(50986999)(50466002)(33646002)(1076002)(6116002)(3846002)(230700001)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR12MB1150; H:tlendack-t1.amdoffice.net; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtNV0hQUjEyTUIxMTUwOzIzOlJ0Y0xhOGdybjJTRHMwbGQ5Mi8xMDN0czA3?= =?utf-8?B?SS95dWZPb3NJbEhXeFJoQW9TdlM3NlVHNTRCYVp0Ri9ERFV2SnJzOE9XbXBI?= =?utf-8?B?eDJvSGtKaExjK3ByZ2FWOXhvTmlHZnJnR2FIMWgraHZoYWNRajh0aE1EYUl5?= =?utf-8?B?c1dTZUdkZ2tFcXBBSXowZ3cvdkc3ek5GZ3NMblpEeWVwelI2aDRCUi9BUGNq?= =?utf-8?B?TW5UU2ViZGowRzhRRHgzYzdmQmJiQ0ljWGEvYUU4d2xxaWIzTEZIQlFpUkdr?= =?utf-8?B?VFZlWTNDTkZqdkQ1R0lySXVkQ3FiVTZqR0lSS3pqSjcvUTRETVV5TzU0dlRG?= =?utf-8?B?WjM5VGJmMnlua3FTbFRzZjQ5U1pvNU4yL1VHdjBYMTFMZXpRL1FtVDVRSytS?= =?utf-8?B?cXZXS1FZWk95OGNoSXVueWVjRDdpUzZTQU85enZMYkZGSEhQYkUwMVhmeUV4?= =?utf-8?B?V0pLNTJaSGdTc2Eybng3U3JLaWVrbUFFaFNtVlc3ZG9zWElVdlA1aHdlMFpq?= =?utf-8?B?OFZVV01LaTZ3WVVUbk4zejZJZ3BseXgyTmlzaFVBejBNZWVNY1ZUR3I2OFBL?= =?utf-8?B?UTBibmVtQXUyemJmTW9UTVBrWTVNMUY5bGdTVUMzM243V2lMblJKWjRtMXM3?= =?utf-8?B?WklsVjZvc2kxUENBY3EzMTdkK1lTR1Jxd205RmJNendBRm9LSXN2MGJkQjZt?= =?utf-8?B?b1VBRnlQZlBVdmhDQnNtUnNYL1kyVXJZTmNnREp6NFVMYXFYU1RVQjA4U2VU?=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8siMoV/j3YiEInRSmBlv1luZxg1WfA7SUkKVi3xClAtFMyHmh8h9rgfBa4rJviIrxEboVX6eLlC5oB0VlroZNvQ6tt9yeCcJY= X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1150; 20:C5KUrJyOxFogDrMinYzXSZ1cWExy6Hq28E+P3BzP6mUblqp/GUb+v+bZ5M/f/Cn96vLtmk+i/Xlw6nxbMWI7adRVfwU8meS1PAaJQvPWoB+0KrYbHxQJOVSWZIZgOqVJbeQS98EyaJH6jynaK2imD9+WJ6mOzr5590z3VlYmeNC25kC0lpzYGSUEW17rzJh1jSqO5JvyjVvMMokKVqZNksrOlH11Z6J8nmm/ibbYdQ3y5KV/syix6+i5zekCqN2Z X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jun 2017 15:13:41.4586 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1150 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 33/38] x86/mm: Use proper encryption attributes with /dev/mem 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 When accessing memory using /dev/mem (or /dev/kmem) use the proper encryption attributes when mapping the memory. To insure the proper attributes are applied when reading or writing /dev/mem, update the xlate_dev_mem_ptr() function to use memremap() which will essentially perform the same steps of applying __va for RAM or using ioremap() if not RAM. To insure the proper attributes are applied when mmapping /dev/mem, update the phys_mem_access_prot() to call phys_mem_access_encrypted(), a new function which will check if the memory should be mapped encrypted or not. If it is not to be mapped encrypted then the VMA protection value is updated to remove the encryption bit. Reviewed-by: Borislav Petkov Signed-off-by: Tom Lendacky --- arch/x86/include/asm/io.h | 3 +++ arch/x86/mm/ioremap.c | 18 +++++++++--------- arch/x86/mm/pat.c | 3 +++ 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h index 09c5557..e080a39 100644 --- a/arch/x86/include/asm/io.h +++ b/arch/x86/include/asm/io.h @@ -386,4 +386,7 @@ extern bool arch_memremap_can_ram_remap(resource_size_t offset, unsigned long flags); #define arch_memremap_can_ram_remap arch_memremap_can_ram_remap +extern bool phys_mem_access_encrypted(unsigned long phys_addr, + unsigned long size); + #endif /* _ASM_X86_IO_H */ diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c index effa529..71d4ca7 100644 --- a/arch/x86/mm/ioremap.c +++ b/arch/x86/mm/ioremap.c @@ -396,12 +396,10 @@ void *xlate_dev_mem_ptr(phys_addr_t phys) unsigned long offset = phys & ~PAGE_MASK; void *vaddr; - /* If page is RAM, we can use __va. Otherwise ioremap and unmap. */ - if (page_is_ram(start >> PAGE_SHIFT)) - return __va(phys); + /* memremap() maps if RAM, otherwise falls back to ioremap() */ + vaddr = memremap(start, PAGE_SIZE, MEMREMAP_WB); - vaddr = ioremap_cache(start, PAGE_SIZE); - /* Only add the offset on success and return NULL if the ioremap() failed: */ + /* Only add the offset on success and return NULL if memremap() failed */ if (vaddr) vaddr += offset; @@ -410,10 +408,7 @@ void *xlate_dev_mem_ptr(phys_addr_t phys) void unxlate_dev_mem_ptr(phys_addr_t phys, void *addr) { - if (page_is_ram(phys >> PAGE_SHIFT)) - return; - - iounmap((void __iomem *)((unsigned long)addr & PAGE_MASK)); + memunmap((void *)((unsigned long)addr & PAGE_MASK)); } /* @@ -622,6 +617,11 @@ pgprot_t __init early_memremap_pgprot_adjust(resource_size_t phys_addr, return prot; } +bool phys_mem_access_encrypted(unsigned long phys_addr, unsigned long size) +{ + return arch_memremap_can_ram_remap(phys_addr, size, 0); +} + #ifdef CONFIG_ARCH_USE_MEMREMAP_PROT /* Remap memory with encryption */ void __init *early_memremap_encrypted(resource_size_t phys_addr, diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c index 6753d9c..b970c95 100644 --- a/arch/x86/mm/pat.c +++ b/arch/x86/mm/pat.c @@ -748,6 +748,9 @@ void arch_io_free_memtype_wc(resource_size_t start, resource_size_t size) pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, unsigned long size, pgprot_t vma_prot) { + if (!phys_mem_access_encrypted(pfn << PAGE_SHIFT, size)) + vma_prot = pgprot_decrypted(vma_prot); + return vma_prot; }