Received: by 10.223.176.46 with SMTP id f43csp2677480wra; Mon, 22 Jan 2018 01:24:46 -0800 (PST) X-Google-Smtp-Source: AH8x227YhycBG8C+4bdAbC9XMOIoq8/tsEqUb0Se3lQLHIPSbO9YmVyR8l114yYhDEcyS80eLs8N X-Received: by 10.98.153.197 with SMTP id t66mr5854951pfk.142.1516613086623; Mon, 22 Jan 2018 01:24:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516613086; cv=none; d=google.com; s=arc-20160816; b=cDGxjsoaA0K4najU4Q3LEXjSdpUGxeqiDjXjXV7e3x82RdMcoU3hR0rDbRSzU9LxyZ FmTmviy4csOxXbbBQ9W82+CvLhrBJVKVC5Zl9ZKabuy3FK6g5VRQ5cWdAWE6LkNHmX6U oiyB4Oteoa18WDvE07/H/HlX9/0K3K3OBCs7gd0LJnH7b//WyWooSoKjYXrDZTr6GYTP lQTy4lNtpAvMoJ6nCwJHfvZvfWguGhNhXqznRn+yxubSzKXi4CGHb2dtP9Z/kxyjYAnH amu6y0jUoRpMOodRUC34AEFHq49HdZDl2ES7WLCvVi22ZqSq0Z/l/Kz0/qseNsdtuiHO DHsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=exu19D1B73c4Krr/W+x2g3x4d+Z2ReyI/cunmJO9I3U=; b=CzjMAciOaCe8PdLdKgkQt+8ikTe1RCmvuczRFIDCWYYaPFGlIF5Syg3a9t1AxXM2fm FaBkn0B9IhPlprXKAPtM9wvML+Iz070eOg1pXtFEACsIWjGagQrZif9O0UvfIoAHnYQ/ gBapmmNs5wCNLudRToFm1wyNcN55j9NFzYNUc2elnp5wOhjxWhJzWJ1VoNmwc3e/5nCC ut9AR3R5P3eLRjOyDF8V1sg8xOucSnjm/ydqzESHk6T4vGJ+LBOFTvkmVRYnK1pqjvVm 9p6IyS3+se5wlew9fUsdoD2DDcbbn/zBjpcWOEwcLxJGzP/HWNd3CJ58P5WKg42goX0a zIwQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g24-v6si3224388plj.25.2018.01.22.01.24.32; Mon, 22 Jan 2018 01:24:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752501AbeAVItO (ORCPT + 99 others); Mon, 22 Jan 2018 03:49:14 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:60614 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752494AbeAVItM (ORCPT ); Mon, 22 Jan 2018 03:49:12 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 8FB5CE10; Mon, 22 Jan 2018 08:49:11 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tom Lendacky , Thomas Gleixner , Borislav Petkov , Dave Hansen , Andy Lutomirski , Nick Lowe Subject: [PATCH 4.9 40/47] x86/cpu, x86/pti: Do not enable PTI on AMD processors Date: Mon, 22 Jan 2018 09:45:51 +0100 Message-Id: <20180122083928.582195223@linuxfoundation.org> X-Mailer: git-send-email 2.16.0 In-Reply-To: <20180122083925.568134913@linuxfoundation.org> References: <20180122083925.568134913@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Tom Lendacky commit 694d99d40972f12e59a3696effee8a376b79d7c8 upstream. AMD processors are not subject to the types of attacks that the kernel page table isolation feature protects against. The AMD microarchitecture does not allow memory references, including speculative references, that access higher privileged data when running in a lesser privileged mode when that access would result in a page fault. Disable page table isolation by default on AMD processors by not setting the X86_BUG_CPU_INSECURE feature, which controls whether X86_FEATURE_PTI is set. Signed-off-by: Tom Lendacky Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Dave Hansen Cc: Andy Lutomirski Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20171227054354.20369.94587.stgit@tlendack-t1.amdoffice.net Cc: Nick Lowe Signed-off-by: Greg Kroah-Hartman --- arch/x86/kernel/cpu/common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -883,8 +883,8 @@ static void __init early_identify_cpu(st setup_force_cpu_cap(X86_FEATURE_ALWAYS); - /* Assume for now that ALL x86 CPUs are insecure */ - setup_force_cpu_bug(X86_BUG_CPU_MELTDOWN); + if (c->x86_vendor != X86_VENDOR_AMD) + setup_force_cpu_bug(X86_BUG_CPU_MELTDOWN); setup_force_cpu_bug(X86_BUG_SPECTRE_V1); setup_force_cpu_bug(X86_BUG_SPECTRE_V2);