From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CEA1EC63798 for ; Wed, 18 Nov 2020 14:04:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8365B21D40 for ; Wed, 18 Nov 2020 14:04:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726944AbgKROEd (ORCPT ); Wed, 18 Nov 2020 09:04:33 -0500 Received: from relay12.mail.gandi.net ([217.70.178.232]:59385 "EHLO relay12.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726479AbgKROEc (ORCPT ); Wed, 18 Nov 2020 09:04:32 -0500 Received: from weirdfishes.localdomain (62-210-143-248.rev.poneytelecom.eu [62.210.143.248]) (Authenticated sender: m@thi.eu.com) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 80CD0200004; Wed, 18 Nov 2020 14:04:27 +0000 (UTC) Received: by weirdfishes.localdomain (Postfix, from userid 1000) id 271D772214948; Wed, 18 Nov 2020 15:04:27 +0100 (CET) Date: Wed, 18 Nov 2020 15:04:27 +0100 From: Mathieu Chouquet-Stringer To: Borislav Petkov Cc: Matthew Garrett , Chris Down , Linux Kernel Mailing List , sean.j.christopherson@intel.com, tony.luck@intel.com, Linus Torvalds , the arch/x86 maintainers , kernel-team@fb.com Subject: [PATCH] x86/msr: Filter MSR writes Message-ID: <20201118140427.GA213447@weirdfishes> Mail-Followup-To: Mathieu Chouquet-Stringer , Borislav Petkov , Matthew Garrett , Chris Down , Linux Kernel Mailing List , sean.j.christopherson@intel.com, tony.luck@intel.com, Linus Torvalds , the arch/x86 maintainers , kernel-team@fb.com References: <20200615063837.GA14668@zn.tnic> <20200714121955.GA2080@chrisdown.name> <20200714154728.GA3101@nazgul.tnic> <20200714160448.GC2080@chrisdown.name> <20201117210018.GA4247@weirdfishes> <20201117212016.GQ5719@zn.tnic> <20201118090929.GC189743@weirdfishes> <20201118115027.GF7472@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201118115027.GF7472@zn.tnic> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 18, 2020 at 12:50:27PM +0100, Borislav Petkov wrote: > On Wed, Nov 18, 2020 at 10:09:29AM +0100, Mathieu Chouquet-Stringer wrote: > > Speaking of doc, looking at the patches you submitted, I didn't see any > > update to the documentation. Would you like me to create a patch for > > that? > > Sure, that would be appreciated. Here you go, let me know if I got that right... --- TAINT_CPU_OUT_OF_SPEC now means what it says. Historically it was for SMP kernel oops on an officially SMP incapable processor but now it also covers CPUs whose MSRs have been incorrectly poked at. Update documentation and script to reflect that. Signed-off-by: Mathieu Chouquet-Stringer --- Documentation/admin-guide/tainted-kernels.rst | 11 ++++++----- tools/debugging/kernel-chktaint | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Documentation/admin-guide/tainted-kernels.rst b/Documentation/admin-guide/tainted-kernels.rst index f718a2eaf1f6..95f432c43ba0 100644 --- a/Documentation/admin-guide/tainted-kernels.rst +++ b/Documentation/admin-guide/tainted-kernels.rst @@ -84,7 +84,7 @@ Bit Log Number Reason that got the kernel tainted === === ====== ======================================================== 0 G/P 1 proprietary module was loaded 1 _/F 2 module was force loaded - 2 _/S 4 SMP kernel oops on an officially SMP incapable processor + 2 _/S 4 kernel running on out of spec processor 3 _/R 8 module was force unloaded 4 _/M 16 processor reported a Machine Check Exception (MCE) 5 _/B 32 bad page referenced or some unexpected page flags @@ -116,10 +116,11 @@ More detailed explanation for tainting 1) ``F`` if any module was force loaded by ``insmod -f``, ``' '`` if all modules were loaded normally. - 2) ``S`` if the oops occurred on an SMP kernel running on hardware that - hasn't been certified as safe to run multiprocessor. - Currently this occurs only on various Athlons that are not - SMP capable. + 2) ``S`` if the kernel is running on any processor that is out of + specifications (writing to MSRs will trigger this behavior). + Historically, it could also be if an oops occured on a kernel running on + hardware that hasn't been certified as safe to run multiprocessor, such + as various Athlons that are not SMP capable. 3) ``R`` if a module was force unloaded by ``rmmod -f``, ``' '`` if all modules were unloaded normally. diff --git a/tools/debugging/kernel-chktaint b/tools/debugging/kernel-chktaint index 2240cb56e6e5..0b9d93e27910 100755 --- a/tools/debugging/kernel-chktaint +++ b/tools/debugging/kernel-chktaint @@ -72,7 +72,7 @@ if [ `expr $T % 2` -eq 0 ]; then addout " " else addout "S" - echo " * SMP kernel oops on an officially SMP incapable processor (#2)" + echo " * kernel running on out of spec processor (#2)" fi T=`expr $T / 2`