From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x226RH2s9hO/LHNaNdxKIP5X9IRnGDeA7DI8mXNNX+OqMMHXBSjvXfoA6BBUF0+Zu7NQC/+Mx ARC-Seal: i=1; a=rsa-sha256; t=1516610953; cv=none; d=google.com; s=arc-20160816; b=vLasZkG1r0VW8b7wYNhEWSnP3b7kof57qKDeD8wuiZdtflhk3C2mkUOdQPgx5nCIqJ skvZ9YEEC3n9ydIK/3XPU5C360wAtI45FISpS5iKqXdL3UsDbLCZXfIIyblJWgSn2m/K nbzlPu8m9AbMsvWPiKSxWdWObmxqk1kgUKfuLsd8CGPxFCHiEXpX9iZyRqHdVqE3RG4p ymOLuJw6rl68oUpAHrE7+GAaErImdFXdYQZiuxXZEveqNdvYEm0Uj1z7Y532EpPlsGIk WdOhGUiceDJIS6xqmsSIiqAwdE++RVY6UFI6dDcIBymxA+sWHhBdIb5482vo3Cvy/ong hLgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=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=0II6xU8Y02cbEiqUgDrXyX6u67U5wn44JYc/eYPcfbF3yayNtIMoMr/JrwWUH0XON+ +QTjvrOpNdgSTcTX/CUG3gAoRyWcMRzHsL9/WR4FvM7BSMBLE/OO+N2JlxpsxdfHzkvr HDTVeQDgnRIes+16QTLFtIw40KmMO8u0mhkC8nalUFE0/yYTi77f9/GqKCB+J5Z3YlYm KEto/cxVKJbcz5Q/fZ3DhcqIvrneP4/FeM91Cc+nGI1DDn+RH99JXyXmqqaGxvq1kM8K kE7gW2UM1eAjhFP7Mr/ED2uxLd0u07QnEup6M09kkA2nX88NYG9PuhXQQPAvusNOmFgO AEmA== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning gregkh@linuxfoundation.org does not designate 90.92.71.90 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning gregkh@linuxfoundation.org does not designate 90.92.71.90 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-LABELS: =?utf-8?b?IlxcU2VudCI=?= X-GMAIL-THRID: =?utf-8?q?1590281430429901005?= X-GMAIL-MSGID: =?utf-8?q?1590281847148956791?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: 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);