From patchwork Fri Jul 7 13:43: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: 9830423 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 B9FB2602CA for ; Fri, 7 Jul 2017 13:45:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD7DE2833E for ; Fri, 7 Jul 2017 13:45:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A198F285EB; Fri, 7 Jul 2017 13:45: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 F0B122833E for ; Fri, 7 Jul 2017 13:45:58 +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 1dTTXz-0005pE-7X; Fri, 07 Jul 2017 13:43:51 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dTTXx-0005nz-Jh for xen-devel@lists.xen.org; Fri, 07 Jul 2017 13:43:49 +0000 Received: from [85.158.143.35] by server-2.bemta-6.messagelabs.com id 61/19-20252-4109F595; Fri, 07 Jul 2017 13:43:48 +0000 X-Brightmail-Tracker: H4sIAAAAAA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msg-Ref: server-6.tower-21.messagelabs.com!1499435025!49149329!1 X-Originating-IP: [104.47.34.81] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.25; banners=-,-,- X-VirusChecked: Checked Received: (qmail 64862 invoked from network); 7 Jul 2017 13:43:47 -0000 Received: from mail-by2nam01on0081.outbound.protection.outlook.com (HELO NAM01-BY2-obe.outbound.protection.outlook.com) (104.47.34.81) by server-6.tower-21.messagelabs.com with AES256-SHA256 encrypted SMTP; 7 Jul 2017 13:43:47 -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=owe/TQwj1iQuMov/DugnT79Bf3RJdwJzockYybN40UY=; b=e9CATpEomHgNamNxzEYmMSDsoJdhq4/gST2BauwUJ5fiOITNsGBmBwdAmg/Yed1sIdv5Iy1n37VkQvpoGMOzj13s4u8FrhEEbw1HpC+oGdw9IEZgXFrwSgqEwCaB/+TNEY3sm29DiJ2vFk4aO7wjIOF5AYVa7NE9bv+txk/n8pg= Received: from tlendack-t1.amdoffice.net (165.204.77.1) by BN6PR12MB1137.namprd12.prod.outlook.com (10.168.226.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1240.13; Fri, 7 Jul 2017 13:43:36 +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, 07 Jul 2017 08:43:32 -0500 Message-ID: <20170707134332.29711.25705.stgit@tlendack-t1.amdoffice.net> In-Reply-To: <20170707133804.29711.1616.stgit@tlendack-t1.amdoffice.net> References: <20170707133804.29711.1616.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: MWHPR1001CA0027.namprd10.prod.outlook.com (10.174.165.40) To BN6PR12MB1137.namprd12.prod.outlook.com (10.168.226.139) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d98b1888-51c3-4d35-70b8-08d4c53e2ded 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)(300000506095)(300135500095); SRVR:BN6PR12MB1137; X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1137; 3:dWo/bbsQjdV+LdoG+wgZ5fL0ssmEPQyKupOFcRtunr7tUp6ezvFwmg00xvboeCLiIu4dKyU0EopAoXFkLoI1Kq22ipMASvtxdmmFW1LZCxwum28/CIuJJPbWU7R1PaI+S5ywqJJYXfj6t3Bjv83coyoPYafgbW7dBzAlQrIcQsMvrckTSeAOKyIjOyLHAzlhk2kIrxLuxOlW/HQyg8lUtXr63VH8dvGqvVf9/4KBkzSSORfFIxsak+VbKS07S/lS21mdHtPQkBdA21gEoneY2fzcCSC9sO7UmnAdOZu2tP7K/k1TH42/ADr/hk+Gaeh3h6sT8gWcs8ZuMiHbbwvJgqw1Wf69m6J1kZX0t6ey+xdKKkbvEJ10tCg8+zaqdmb1m95FpWKsD2D2jISJ8pVDEiuBSKY/r7LSIdmUQkmyWKjH1pj/2i0LDcMMa5iuPVa4o4SsAKZRODy2xoMh4RTLeVyQmpaZIODJ45DBRQ1vrCkWbzRIu2NKDeWXMi8R0MJqiA1NYUIN/AEtovUgT0IsfBVXyvqBNlmIsKFnwiwjaA0+ECq6HGrXyJBxrccTG3gsdm1DNCjl1+pLhrVotFx/cbWxGf9Ywy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38kGpB7jDQir3tkHMUUXbz2SUlCEkRQM2tstRCKyPEnYQNK/0dfC50U6KGF4loLyIbsWvOIN4HQoTKUDFaij0wtmbyePSqzgUBSiv1uMC+8yl7zbm+6pzy8nlhPocBlveEg2R2QsuYLYQpj1ddIkmQ0+2/CriQhjvSan03TtGbB+X4hyhTqRgtv78bvlNnVuPOGhzL/tBo9VqvkZqbnar0Mmi6+WKd+8BwAr4q36XB9+MmOWLdbC8oOvQS+/ouu2ZDMxs82zIY9vA29tzR3S0ulFML+l8geg8fILNkPlpwBPnW0HrP X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(133145235818549)(236129657087228)(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(2017060910064)(5005006)(8121501046)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(3002001)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123560025)(20161123555025)(20161123562025)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR12MB1137; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR12MB1137; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjZQUjEyTUIxMTM3OzQ6bHRKaWZUTnFXTEJPZ05jTGVnR1A0eWpiZ0hZ?= =?utf-8?B?aU12NGZ3M3d4bEJjRUpQVVpIZVVWOUZxNU9rMlB4WUd1VEgzZm5CMms1K0Fs?= =?utf-8?B?YTl2VDdJYTJ4elp6VVlPaElFdjg2WjhvU0tNTkRwdDBrQTJMSDVFK2tsMnQ4?= =?utf-8?B?dWVjL2RxcDlRSE5SRTQxODJkQWx6Zm9EeHFZcXhWcStBd3pYSUt3S01DSk9F?= =?utf-8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yL3pQeEZR?= =?utf-8?B?ZUNoaUpEZE9PZ0lqTDRpa01wY1hlZkhoeU9kQnFoNktCUnJZOTFqSTArWTlN?= =?utf-8?B?RHN4bElobmt6L1phbi9xNXdSS2JyUXZWL2tlNXA0UWJZS3p1ZVdNcS9OK2ZS?= =?utf-8?B?OXRyc0ZuYW91dExlVXorMEQ0bCtyTC91TUFmVnljeUpBU3dZZE5LS24wclYz?= =?utf-8?B?NWxBUzhnVEMrMDdBNWpwRjNiUGE4MmMxS201V0U0eGNobXRWdjF4KzY2MDha?= =?utf-8?B?WUxKMHluODJmUThxZXd6Sys4bW1xWW1OZjNPRzZrVjBXM050U1B4OVNqTTJ0?= =?utf-8?B?dDhIUFlKaXFDRnNRa3NydGlFN2tOemN0RHhZQnpjNS8wYnE3dWlkbjZJczJw?= =?utf-8?B?cmJ4NHlVUVowdlArQ1M3MEV2WWpVUUM1SGxOOGw1KzgzS0RvTTJuU0E0ekJP?= =?utf-8?B?d0FRTWJvblkxeEN2bk1NZkVsYWtxdmZTTVlyRjlzMmJndkw0aU5rakZ2bzVm?= =?utf-8?B?SUNOR2xqLy9VTDEzc0dhNjhUZXBScHZZZm9GSjdhQTRrcjJSM1BIVGYzVGdH?= =?utf-8?B?emd3aktUWk14WlRrVE5CbkNWeXd3TDJxUGVFRGJkbDZaZi95b0w0d0Vabkds?= =?utf-8?Q?/vkJFtAU8q4cXGLyzs3hQSujRDVWbdY0I1Dc=3D?= X-Forefront-PRVS: 0361212EA8 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39860400002)(39450400003)(39840400002)(39410400002)(39400400002)(39850400002)(2906002)(97746001)(66066001)(7736002)(47776003)(81166006)(8676002)(103116003)(86362001)(50466002)(189998001)(42186005)(4326008)(53936002)(2950100002)(55016002)(6666003)(9686003)(38730400002)(110136004)(23676002)(53416004)(33646002)(6506006)(54906002)(25786009)(6116002)(7406005)(478600001)(72206003)(3846002)(230700001)(54356999)(1076002)(305945005)(76176999)(83506001)(50986999)(7416002)(5660300001)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR12MB1137; H:tlendack-t1.amdoffice.net; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjZQUjEyTUIxMTM3OzIzOjlHejJBSXlxZjJEa3FjMFB4cUsrMFl0TG91?= =?utf-8?B?RlF1TTdvalRUWjJjOHl3NTFFMy8zN2xJWGpaWDNjN3AxeGZMcTk0cER0SVZZ?= =?utf-8?B?WE8yQ3VXNjlxeHlBVFJhOHZNUGtmbnhhdkFFR3RGTytrM0N4VmxDTVRzU1ZJ?= =?utf-8?B?cGZTT3FuVVhrZG9aTHVwdUlhSzZnTDROcWpQTXRhUWhxWlczYkozZXl0bXYv?= =?utf-8?B?eHl3VHVTWUkvNFU3NTlyZFR6aURxZ3phbTI2SWhTbVJOZVc3Q0xpTkVNL1pU?= =?utf-8?B?UU1rM3F6eE8wWXJ3cWZUVzVrVHdTL3NFTkxIY1RQMnB0YlZkTDYrSXlwVmNv?= =?utf-8?B?R24zRGY2WkJmUzBkOUFMcTZFbDEySy9tcjNMNUg1VGJ6SXQ5U0p1T2lCNUx0?= =?utf-8?B?WWNkSGVCbW9xaTc1QjVUcVAyaVVtVWdVZktuMjlMSTNBSndyRmt0MzBXSDhZ?= =?utf-8?B?VHN1djRTcFB4Ym1jNEt3NzBsRnkxY20yUkJKK3dNV1ZuMVBROGdaZVRIcjNv?= =?utf-8?B?QzhzMVdBTVZxSGtJQW1GSDYwNU4vczFHY2VaSC9HbFlYRVFaTkYxNHZJZEUr?= =?utf-8?B?Um1KWkE5WjQ2MmJSbG5pRmNjTWw1U21PWksyaDBiMDFxbzlsdWtDR0Z2T3Rz?= =?utf-8?B?OXM4ZzhvZGFDNXRJdFRSbmhPbjVQd3JYdkpxM2w2UTZWand3U01TWEd3MUVH?= =?utf-8?B?RnVhSUg1ZkF3eWtEMHdrVkhpTVh3c05wc1poc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o0SRUQO/IUTNU46uMlkCEwf1K5NXtaWFECEa5S+OslMOJcYv4wMg0WMZzjmhtjwmwpN4p4LObH7YmGamqPmLZT2rNMrOGk9hw= X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1137; 20:enWcMqbq//kYCBGEdfLuPxzWH+ctV2iZtmeDuVEfWnu8rNXYLGbb12niq96Bon/r6ZZf6xBOiSSRv3XmHlqMaVogE0blQUe65QZ9mSq2lypCa6rcFgrXF1FID+LLwA8Nso1z40d2m4aNyvICsK9JlnA/3skFmIHwQB5ocy9ZVvRACWHbKCeYJplPOMYoO1GuxMK9IOWvLx2vUdLeRX2rwyj/oYhR85OtnB6qMSBrEdURaLl1ePAliqbltfvrK8IY X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2017 13:43:36.9793 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1137 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 v9 29/38] x86, drm, fbdev: Do not specify encrypted memory for video mappings 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 Since video memory needs to be accessed decrypted, be sure that the memory encryption mask is not set for the video ranges. Reviewed-by: Borislav Petkov Signed-off-by: Tom Lendacky --- arch/x86/include/asm/vga.h | 14 +++++++++++++- arch/x86/mm/pageattr.c | 2 ++ drivers/gpu/drm/drm_gem.c | 2 ++ drivers/gpu/drm/drm_vm.c | 4 ++++ drivers/gpu/drm/ttm/ttm_bo_vm.c | 7 +++++-- drivers/gpu/drm/udl/udl_fb.c | 4 ++++ drivers/video/fbdev/core/fbmem.c | 12 ++++++++++++ 7 files changed, 42 insertions(+), 3 deletions(-) diff --git a/arch/x86/include/asm/vga.h b/arch/x86/include/asm/vga.h index c4b9dc2..9f42bee 100644 --- a/arch/x86/include/asm/vga.h +++ b/arch/x86/include/asm/vga.h @@ -7,12 +7,24 @@ #ifndef _ASM_X86_VGA_H #define _ASM_X86_VGA_H +#include + /* * On the PC, we can just recalculate addresses and then * access the videoram directly without any black magic. + * To support memory encryption however, we need to access + * the videoram as decrypted memory. */ -#define VGA_MAP_MEM(x, s) (unsigned long)phys_to_virt(x) +#define VGA_MAP_MEM(x, s) \ +({ \ + unsigned long start = (unsigned long)phys_to_virt(x); \ + \ + if (IS_ENABLED(CONFIG_AMD_MEM_ENCRYPT)) \ + set_memory_decrypted(start, (s) >> PAGE_SHIFT); \ + \ + start; \ +}) #define vga_readb(x) (*(x)) #define vga_writeb(x, y) (*(y) = (x)) diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index d9e09fb..13fc5db 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c @@ -1825,11 +1825,13 @@ int set_memory_encrypted(unsigned long addr, int numpages) { return __set_memory_enc_dec(addr, numpages, true); } +EXPORT_SYMBOL_GPL(set_memory_encrypted); int set_memory_decrypted(unsigned long addr, int numpages) { return __set_memory_enc_dec(addr, numpages, false); } +EXPORT_SYMBOL_GPL(set_memory_decrypted); int set_pages_uc(struct page *page, int numpages) { diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c index b1e28c9..019f48c 100644 --- a/drivers/gpu/drm/drm_gem.c +++ b/drivers/gpu/drm/drm_gem.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -928,6 +929,7 @@ int drm_gem_mmap_obj(struct drm_gem_object *obj, unsigned long obj_size, vma->vm_ops = dev->driver->gem_vm_ops; vma->vm_private_data = obj; vma->vm_page_prot = pgprot_writecombine(vm_get_page_prot(vma->vm_flags)); + vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot); /* Take a ref for this mapping of the object, so that the fault * handler can dereference the mmap offset's pointer to the object. diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c index 1170b32..ed4bcbf 100644 --- a/drivers/gpu/drm/drm_vm.c +++ b/drivers/gpu/drm/drm_vm.c @@ -40,6 +40,7 @@ #include #include #endif +#include #include #include "drm_internal.h" #include "drm_legacy.h" @@ -58,6 +59,9 @@ static pgprot_t drm_io_prot(struct drm_local_map *map, { pgprot_t tmp = vm_get_page_prot(vma->vm_flags); + /* We don't want graphics memory to be mapped encrypted */ + tmp = pgprot_decrypted(tmp); + #if defined(__i386__) || defined(__x86_64__) || defined(__powerpc__) if (map->type == _DRM_REGISTERS && !(map->flags & _DRM_WRITE_COMBINING)) tmp = pgprot_noncached(tmp); diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c b/drivers/gpu/drm/ttm/ttm_bo_vm.c index 9f53df9..622dab6 100644 --- a/drivers/gpu/drm/ttm/ttm_bo_vm.c +++ b/drivers/gpu/drm/ttm/ttm_bo_vm.c @@ -39,6 +39,7 @@ #include #include #include +#include #define TTM_BO_VM_NUM_PREFAULT 16 @@ -230,9 +231,11 @@ static int ttm_bo_vm_fault(struct vm_fault *vmf) * first page. */ for (i = 0; i < TTM_BO_VM_NUM_PREFAULT; ++i) { - if (bo->mem.bus.is_iomem) + if (bo->mem.bus.is_iomem) { + /* Iomem should not be marked encrypted */ + cvma.vm_page_prot = pgprot_decrypted(cvma.vm_page_prot); pfn = bdev->driver->io_mem_pfn(bo, page_offset); - else { + } else { page = ttm->pages[page_offset]; if (unlikely(!page && i == 0)) { retval = VM_FAULT_OOM; diff --git a/drivers/gpu/drm/udl/udl_fb.c b/drivers/gpu/drm/udl/udl_fb.c index 4a65003..92e1690 100644 --- a/drivers/gpu/drm/udl/udl_fb.c +++ b/drivers/gpu/drm/udl/udl_fb.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -169,6 +170,9 @@ static int udl_fb_mmap(struct fb_info *info, struct vm_area_struct *vma) pr_notice("mmap() framebuffer addr:%lu size:%lu\n", pos, size); + /* We don't want the framebuffer to be mapped encrypted */ + vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot); + while (size > 0) { page = vmalloc_to_pfn((void *)pos); if (remap_pfn_range(vma, start, page, PAGE_SIZE, PAGE_SHARED)) diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c index 069fe79..b5e7c33 100644 --- a/drivers/video/fbdev/core/fbmem.c +++ b/drivers/video/fbdev/core/fbmem.c @@ -32,6 +32,7 @@ #include #include #include +#include #include @@ -1405,6 +1406,12 @@ static long fb_compat_ioctl(struct file *file, unsigned int cmd, mutex_lock(&info->mm_lock); if (fb->fb_mmap) { int res; + + /* + * The framebuffer needs to be accessed decrypted, be sure + * SME protection is removed ahead of the call + */ + vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot); res = fb->fb_mmap(info, vma); mutex_unlock(&info->mm_lock); return res; @@ -1430,6 +1437,11 @@ static long fb_compat_ioctl(struct file *file, unsigned int cmd, mutex_unlock(&info->mm_lock); vma->vm_page_prot = vm_get_page_prot(vma->vm_flags); + /* + * The framebuffer needs to be accessed decrypted, be sure + * SME protection is removed + */ + vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot); fb_pgprotect(file, vma, start); return vm_iomap_memory(vma, start, len);