Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752606AbdFGTRk (ORCPT ); Wed, 7 Jun 2017 15:17:40 -0400 Received: from mail-sn1nam02on0044.outbound.protection.outlook.com ([104.47.36.44]:56743 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751987AbdFGTRb (ORCPT ); Wed, 7 Jun 2017 15:17:31 -0400 Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=amd.com; From: Tom Lendacky Subject: [PATCH v6 23/34] x86, realmode: Decrypt trampoline area if memory encryption is active 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, linux-mm@kvack.org, iommu@lists.linux-foundation.org Cc: Rik van Riel , Radim =?utf-8?b?S3LEjW3DocWZ?= , Toshimitsu Kani , Arnd Bergmann , Jonathan Corbet , Matt Fleming , "Michael S. Tsirkin" , Joerg Roedel , Konrad Rzeszutek Wilk , Paolo Bonzini , Larry Woodman , Brijesh Singh , Ingo Molnar , Borislav Petkov , Andy Lutomirski , "H. Peter Anvin" , Andrey Ryabinin , Alexander Potapenko , Dave Young , Thomas Gleixner , Dmitry Vyukov Date: Wed, 07 Jun 2017 14:17:09 -0500 Message-ID: <20170607191709.28645.69034.stgit@tlendack-t1.amdoffice.net> In-Reply-To: <20170607191309.28645.15241.stgit@tlendack-t1.amdoffice.net> References: <20170607191309.28645.15241.stgit@tlendack-t1.amdoffice.net> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: BN6PR17CA0038.namprd17.prod.outlook.com (10.175.189.24) To CY4PR12MB1141.namprd12.prod.outlook.com (10.168.163.149) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PR12MB1141: X-MS-Office365-Filtering-Correlation-Id: ccf58675-7bf7-4df1-0f3f-08d4add9cef2 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:TloewqiDL0HTEhDnxOapBVjGkXhM7UVisrBPpUfNynOa0gfa57CXnzwHyJaNjsR6h1MNaSRigI5JgK4jAhuEGIg3rmwLhQ2lWxiXdwIMmRVisbM48dMK5o5duolBoqVTczaNSjugIxqo6XV7zlpBtQX0G7bu84NZbZ+SRpYSp0hWM+AVhEoxRYlBCTFraCyW6hs5hFTdX6HG/Zi4Q0u4yLGWK8c/nf9/24014T3N0hOjNZb3+z36RtkEDzI49YDiO8K00G+bDLkGx3/URAmaVWxq/RNkYqYDRLSXJfUDB0I+wS7dw2lKwFNR++1Nuk2vHQnWAsuOGmNwSuMiZGX+mDWzHlk1BusbfFgbZlNjTfo=;25:9A+rFHMl/XBKxKT68JQO/R8/3gaZAJ0dynN1wUzs/HMrR/mtWu/sayFot1CUl+cIK2bTKslMy1zJD27pymmy5KLZ7P58ODlmXhWshBc09j1X0x2mZyV+aNQYVq82izkHEZrM+O4E1KUME5v4BnYdTem21Gz4kaRVfskswqHl/SHVoUPHQHHNo/t+KERXuVlVrsM9Pr9v1n1VIZHsWo57EEcJY4dQAPcxgmOMPZ+vrZiYNL5wZP58cxkCLkRroCWCODyYxkgJq7AKjYX+zTLh9Fx7fOUA53eCG8R+LvPzuohtHlsvhNT1mC7Q0OajrxuQLD9y67Ye2c9MKuNMfe0ni5f0FXtRLoZ8p6C6JVJIZYKSIqAaXDksur3q2W6vrvvw5eUMFIvpRh/zvPnuuVVAcKYUUPcG+bZj2VFc6w2B9wiCSR6JMgN292g+2X3cp4RXagwRVaLb7pmnjh0HISn6VDUYL/JsCtMV5Y175Ys9g/c= X-Microsoft-Exchange-Diagnostics: 1;CY4PR12MB1141;31:iATgtd/0Yu5j+OVzteQZ9qo7z8YEgl+IDQmrnKVdXE+0CMNgozP2Oy6yz/m48c+4RNY9UDKtWtDBM6CL5XioLtl0MEMHtaUsjzdE83IjtGF4faVyoxycTiQ4dDOQGsedbcBa3H6Lj6srloHMlcOKsBXyqYloyp+t/6EuSr3DcJ5wQ5QSztuB94NBmKNJpMX2kj2wjQZRKdJxQQRtLBmE717erxT3tYbkhpAm5hBfmN4=;20:o3+bKcqTXgyZ+WKxPXp/gl7K8sjGqj+teDOnHF+2N8DM8z9lbVMTSVLJbGT2EyhWjru6ukz8fSJGeUwpPD+Q0yh8El7O7V0R1dAfXBo1CSW66Mzw+lVJsjd+dvonYUARU9/um/wAe1/mWYYyBNadkPKZ0MU14lXExsvX88+7I/GVQx8wwXUGPdg8YKEdk8fOTH9jR7m0b8jPIiKAjw0DC/O1ZMfqNqsVuyCRHPlc+dY2N2gcfqupER6T/N+As0d3sNBtdrhwpk2woyJs2ZUpsoZ5SfsCwqACZk6PqQvE9CzEcWiswl1FkTwFRq8RWmBAqmaGvuuID/g9Tl0+5+iWl28/4kquUis9v9NhkmSQiOavdp7Hf0/LOecGupsj2+ZAYkhDMs8YR6q+raZbfnzP6tL99KSTRAyV830gJl3565HIqLSOqB3+UFSLsiSydlw/ECGhDu0j51+zBt59zNPlUJPnEeJM6Ahn5HU6Jjqb2XP5gp/4t/1ekvceO/er0hEe 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)(100000703101)(100105400095)(10201501046)(3002001)(6055026)(6041248)(20161123555025)(20161123558100)(20161123564025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(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?MTtDWTRQUjEyTUIxMTQxOzQ6QWhYaTBNUHg1ZEE4SEhXSFVyV0lzMVNMRWZK?= =?utf-8?B?YmltRXltWnliNnR6MG9QaHF3bmcyZXo0STY5QWlyRndEdmtDVjdzZWpqSkQx?= =?utf-8?B?enB6YkVVcUh1TGl0VVlHeE50ald0L1hiOFlRT3hJUFhQaTZNay8vdW1zWEh6?= =?utf-8?B?RzAzSG16V2Z3cFBsWVcycTlwQ3MxaTh0T0wxL01uRGtIRjl5N1N4bnBXUnhB?= =?utf-8?B?WE5VZlB4K0RzUWw3bE9PQlhFMnVDSm1HaHBOY3laMXRWWkpQTG1QUlBPS3pj?= =?utf-8?B?RGl1Y0NYL1NndG8yNE4vNzdzOTJUa2duMnZOWXVZN0NjRWNucEUrSlJoUHdD?= =?utf-8?B?NW9rMmJJU0pJWnAyZWc1WXVndUdYV3ExVFJmaFUxMkxzbUJtUXNzdEo5QTdZ?= =?utf-8?B?dDhOanRQRmlCdy9rOGMyOWxTMDdKaklWWjhQK1l0UHBvUFZ0Nkt0UnBJNmVE?= =?utf-8?B?cXl0ZlpnbjNuWlk1VDhyQWhaVlFPUURab3U1TTBsNVlBQm9DRkFMMHN6WHln?= =?utf-8?B?RVF1QndVVmQzUHl1STNVYjdWUVFCNEYvcjl3SjJtSUV4Tlh3S0pMS1ZkZ2tS?= =?utf-8?B?Zmp5aEZVYWxzd2I0bHZXL2d6TjdpekE0MlJwMVVZTnJydGZldlI2S3pyMGdU?= =?utf-8?B?OFQ1NmxINGU0SzBwUjNSYWwxTzlPZG1aQTlnZVFCYnJoeDVFaGh4cG1hM0dx?= =?utf-8?B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xazJaSXQ0dHZx?= =?utf-8?Q?IVesXSTlk9Rtyjw9W2M?= X-Forefront-PRVS: 03319F6FEF X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(39450400003)(39840400002)(39860400002)(39410400002)(39850400002)(39400400002)(9686003)(54906002)(55016002)(6506006)(66066001)(4326008)(47776003)(110136004)(103116003)(25786009)(38730400002)(72206003)(478600001)(83506001)(305945005)(7736002)(86362001)(76176999)(50466002)(53936002)(54356999)(97746001)(7416002)(7406005)(23676002)(1076002)(6116002)(33646002)(3846002)(50986999)(230700001)(53416004)(42186005)(5660300001)(4001350100001)(8676002)(81166006)(2906002)(2950100002)(6666003)(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?MTtDWTRQUjEyTUIxMTQxOzIzOmNsRVFHNjJ2OENIUlJXQSs0eCtxYUpoSldL?= =?utf-8?B?QzlBRXhiMGlXMm1QUDNNMXppMjk4dmhhSFQ3ZVlKdDFCYlZnRVJrcDhzMFNX?= =?utf-8?B?Sk5Fd2p0bXczbDMxelB2UFVyN05WdXlCOHJlV2Rja0d1M05aS1ViOEpRZk8z?= =?utf-8?B?MlRvdXU0NW5TQTFKZ0xvNHphTDVodlZpMnNSM2hNakpXdndNc1N5eFFHc2pX?= =?utf-8?B?SlZIamRjbkRKUkVrWXRZN3oyVm9BNjJnY0x0K3lzYnJTc2pqdnErN1FBLzA4?= =?utf-8?B?V1FXVk1BbkJaOGlYMGVKTmdTbUdSSHkrWTJwMWN4Z3gycExwbWFJcUxRRWZC?= =?utf-8?B?MzZPNEhnZDhQK3ByS3NPSWxySTFZZGdXTmlRNThPd3VRQ1NqckgxeGhiWTZJ?= =?utf-8?B?ZGpwdkV4eEJNSmJOaVlIMEFFbzYzbUdVck9VNXlnYlhTZ1F5Z25rNVB0VFNZ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BtDHNq1ya7wB4tLvSQbmvUQLlhs/D3B6NxeUolFQw/FnDLzT66SCRytYiYhnptsF8K+pIgnmLzA0ZOykVDqohr+9h2Zl2jtPaT6/LI3tPE2FLt5DMJgErwTWF9YowxA/gpJUOOCwFbAJ5zfScisFbkeMyBPdaVLrdTFb/DxdUsiMoeIitE4uM0LalgjSQ14jkg5mAVU9pAOCjL+ X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jun 2017 19:17:12.7717 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1141 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2169 Lines: 59 When Secure Memory Encryption is enabled, the trampoline area must not be encrypted. A CPU running in real mode will not be able to decrypt memory that has been encrypted because it will not be able to use addresses with the memory encryption mask. A recent change that added a new system_state value exposed a warning issued by early_ioreamp() when the system_state was not SYSTEM_BOOTING. At the stage where the trampoline area is decrypted, the system_state is now SYSTEM_SCHEDULING. The check was changed to issue a warning if the system_state is greater than or equal to SYSTEM_RUNNING. Signed-off-by: Tom Lendacky --- arch/x86/realmode/init.c | 11 +++++++++++ mm/early_ioremap.c | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/arch/x86/realmode/init.c b/arch/x86/realmode/init.c index a163a90..195ba29 100644 --- a/arch/x86/realmode/init.c +++ b/arch/x86/realmode/init.c @@ -6,6 +6,7 @@ #include #include #include +#include struct real_mode_header *real_mode_header; u32 *trampoline_cr4_features; @@ -130,6 +131,16 @@ static void __init set_real_mode_permissions(void) unsigned long text_start = (unsigned long) __va(real_mode_header->text_start); + /* + * If SME is active, the trampoline area will need to be in + * decrypted memory in order to bring up other processors + * successfully. + */ + if (sme_active()) { + sme_early_decrypt(__pa(base), size); + set_memory_decrypted((unsigned long)base, size >> PAGE_SHIFT); + } + set_memory_nx((unsigned long) base, size >> PAGE_SHIFT); set_memory_ro((unsigned long) base, ro_size >> PAGE_SHIFT); set_memory_x((unsigned long) text_start, text_size >> PAGE_SHIFT); diff --git a/mm/early_ioremap.c b/mm/early_ioremap.c index b1dd4a9..01d13ae 100644 --- a/mm/early_ioremap.c +++ b/mm/early_ioremap.c @@ -110,7 +110,7 @@ static int __init check_early_ioremap_leak(void) enum fixed_addresses idx; int i, slot; - WARN_ON(system_state != SYSTEM_BOOTING); + WARN_ON(system_state >= SYSTEM_RUNNING); slot = -1; for (i = 0; i < FIX_BTMAPS_SLOTS; i++) {