Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751992AbdL0Or1 (ORCPT ); Wed, 27 Dec 2017 09:47:27 -0500 Received: from mail-sn1nam01on0044.outbound.protection.outlook.com ([104.47.32.44]:22064 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751917AbdL0OrZ (ORCPT ); Wed, 27 Dec 2017 09:47:25 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Thomas.Lendacky@amd.com; Subject: Re: [PATCH] x86/cpu, x86/pti: Do not enable PTI on AMD processors To: Dave Hansen , x86@kernel.org Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Andy Lutomirski , "H. Peter Anvin" , Thomas Gleixner , Borislav Petkov References: <20171227054354.20369.94587.stgit@tlendack-t1.amdoffice.net> <4ecfab84-ae81-2e00-9004-8d0ccf863f76@linux.intel.com> From: Tom Lendacky Message-ID: <26b626e4-d01b-4a43-1c70-a4db7322dbbe@amd.com> Date: Wed, 27 Dec 2017 08:47:18 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <4ecfab84-ae81-2e00-9004-8d0ccf863f76@linux.intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: MWHPR12CA0032.namprd12.prod.outlook.com (10.172.49.18) To CY4PR12MB1141.namprd12.prod.outlook.com (10.168.163.149) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 56e1348c-4152-4bb0-8810-08d54d38bd5b X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(48565401081)(2017052603307)(7153060);SRVR:CY4PR12MB1141; X-Microsoft-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tl9r+1JKhgWnYAYYLNjz4Uf9jNcz+t11ZHfh654iTZmXRzURW9NOdyhO4vJcZGOOKo/kdwTk+HN9zZ+zWP2YWdXbR5Zis2TavudXAJnbApxz5ZCYkcI+/BqmuUv4vRGwF74Rdp3Bh2uag6NKZF95ke4xXimsznaOtxlmWomCk1jxYJbmGi8GUfwjahWhixRIeWUDnmCLpaxRcHlsntojI0yQhjgu6wgHoRhirnFEmCMFyhdoIqrChb7f0Q5ay3H0wIVkBOuny2qAK8VRkC8OoGVz6ZxsLV9G+32cU0FmoWHB/caoaUpZ67mx1LgTziYl4nMAd6vJU2vcW7+GotonqqvmjhcX1QqCxd0uk+uqYKc7YyzbhFUN2xj;4:NaZiKViy8rauwonlEsQyTK47M0vdkFZgTokJiRXwT9XRSCw63KVKxBr8ZmPL9nMHjBPRW71SJunO+jxnFnCgoGqk457P9t4gCdjDcBbWYu3mqpNWKCIBlX8lo8dUiyAm+9rwoadkJTbde35+tvPZLFDmKv6QRS1lGuIH3uTvfG5797sXNnl9Jf0vYjzbSfQXdcOx7ilVhfsQKDtOFmV0HE1YEDMgF8U/SUQg0yfP5aC3Ij/ZRAoxMdGhsFdW8bKoeOcv6HtSMjxyeFPugu0WDw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040470)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(10201501046)(3231023)(944501075)(6055026)(6041268)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(20161123562045)(6072148)(201708071742011);SRVR:CY4PR12MB1141;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:CY4PR12MB1141; X-Forefront-PRVS: 0534947130 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6049001)(376002)(396003)(366004)(39860400002)(39380400002)(346002)(189003)(199004)(24454002)(65826007)(81156014)(8676002)(31696002)(68736007)(31686004)(81166006)(50466002)(8936002)(105586002)(2906002)(229853002)(106356001)(97736004)(90366009)(6486002)(65806001)(65956001)(47776003)(77096006)(66066001)(53546011)(6116002)(64126003)(3846002)(230700001)(386003)(7736002)(305945005)(6246003)(53936002)(58126008)(5660300001)(86362001)(6666003)(478600001)(16576012)(2950100002)(316002)(72206003)(36756003)(52116002)(83506002)(3260700006)(4326008)(54906003)(2486003)(52146003)(23676004)(16526018)(25786009)(76176011);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR12MB1141;H:[10.236.65.116];FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTRQUjEyTUIxMTQxOzIzOlNkZVJxTExZVElqSGo1WWRUTm9vbGYrS3Jz?= =?utf-8?B?cGptdUZ5dWxmNmdoZWVGL0pvbmFkKzNRVldTS2VpY1BHODNKTzAweFZOY3V6?= =?utf-8?B?TzNqWWN0b2tlcUVINCt2NVpJSXRSUEtRUHAydWFCUmlLTUhtNndEVTc4aXF5?= =?utf-8?B?aXhSK3ZtM2dNeEFJYXhlUkR0V2JjSVcrT092eW1panRTY2RjclNKY2tJWUZq?= =?utf-8?B?SHptR0lhekNmMnY4dGF6MTNybWlLdEVtK0t1ZDRQcThvZVVYQ2E0K3Ztd3ZL?= =?utf-8?B?VFhGRTQ1K3I4UHpJSVBYajl0MTZ6Q0w3WlhjblI5QS9mZGl0WnNlK2NTdlpx?= =?utf-8?B?U3FrL3VQRFlhcyt5dHl0L2RZclJTWHhxMkJMeFpSSFhLRFNpcnFKT09LZW5t?= =?utf-8?B?R1BjMGlvSHcvd1lQcVFtTWs1dHo0Q1h4ajVkUlA1TVFSa1FRRldYdzQzL2w5?= =?utf-8?B?OWxTUmR0T2NpY1gyR08zeDU2T0RkNmdHSTkwV1Vkdis1Y2wxM1FRci9HeG5I?= =?utf-8?B?dUVxK2RjR1hNbHcwbERNUTRFd09KWnZhVWR0VjlJMmF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o0r1MSuZYtJ3SxYY/uIlmOy8IUe/Bb9Q6ZMLePO1yWP8mXA4zplzYAXriEnGfzdoS2IGht7KnSE=;24:cVa82Inb95pTSDtZLLDG864yKgEOi6BxO3tvjqCWyzWJQR3YiMcIkbJundaawqg7aufYIwsIPMHqpOVdWahcKPm+CO8l+zGUghFJCD3vdWM=;7:P/pEYZ6xEY6as5nxvYT2agztF0EPst3gGdKztjBbvhNSjMbD/2z+q96ohzPlmA5MR6WpUPO4YOQ9e3KYp0IDOOX4Emtl3Mo2a8WM5Vpe9Jny9YDJBEedT/sdNCuwb8gWrzju/9mStXrTLdOaoT1Zr5DAq33FxWZC4T1LDhBZlX8Xz9omiKX24X0Pg+A3oNx8ao7pVSNj5WD86nNovI140K/aINJFIRifP0JFkfiVclTGl/Ye0nMEO9d69a6Ydcpr SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CY4PR12MB1141;20:L94HI03AOPBpW7ZBth5JqvXZbCutMiIfsllB+XdQh31gIY72FWujxd29iyj4J46739YFFaMZ8OSDukaC1K1aelJMuKXaNDWM0t2KGfHeDnh3n/pn2wSqnpav3tUUE4mVb050eFEVHWrXuegpPB4yTTvvhrUj08nqkirouX0EN/CtHbeSPCSW0rCKcDFuq5ekPlkCTkHcKTZa+eqT9kR4TOoaimZue1LMeJyHiaaPph8wwd5rXA8QOulTKCS/okql X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Dec 2017 14:47:22.3974 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 56e1348c-4152-4bb0-8810-08d54d38bd5b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d 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: 886 Lines: 29 On 12/27/2017 2:48 AM, Dave Hansen wrote: > On 12/26/2017 09:43 PM, Tom Lendacky wrote: >> --- a/arch/x86/kernel/cpu/common.c >> +++ b/arch/x86/kernel/cpu/common.c >> @@ -923,8 +923,8 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c) >> >> setup_force_cpu_cap(X86_FEATURE_ALWAYS); >> >> - /* Assume for now that ALL x86 CPUs are insecure */ >> - setup_force_cpu_bug(X86_BUG_CPU_INSECURE); >> + if (c->x86_vendor != X86_VENDOR_AMD) >> + setup_force_cpu_bug(X86_BUG_CPU_INSECURE); > > Does this disable it in a way that it can be turned back on via the > kernel command-line? > Yes, specifying pti=on on the command line will turn kernel page table isolation on regardless of this setting. Thanks, Tom > This is a rather wide class of issues and I would rather not just > hard-code it in a way that we say one vendor has never and will never be > affected. >