Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp344764pxb; Wed, 18 Nov 2020 06:08:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJyXCHWGz9rBNZAwhX8yUoxCNXCAUxUwOfZ/5Ap3VId4TfoZUjGPj776sONIsTthCfipuc5p X-Received: by 2002:a17:906:eb46:: with SMTP id mc6mr7384683ejb.54.1605708533879; Wed, 18 Nov 2020 06:08:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605708533; cv=none; d=google.com; s=arc-20160816; b=FVZG3xB/aDcwLwGNC3NsMPd37Oh/Ys+svGmQzdjQDkW3hdfPwGuw5nVBwUJw5i+vJk 5cDJ74yFAfnSDwoagHOTDdS0mmOscwq3mX+jQTi/+BAmygmkqdOQFyuZDm+27Am3eAVV qVkh9qibhnwB9zwtkyob6R7O9KnjbnLfzOl8MbPhMmWslR3bRn4DCud4AaHlIwx/kPzT niHJS+WqUEzkOOfbGqnU95cH3WF5h5yyX2V5J0HsySwPEV4ghhNadiKXFG/JZOCIoPos xt2JuZFZEH/xbLvCwXOGX8dhkTjfwEOp9jrUrTT8avrKcReW1rmvleVSVpl1hAEH09QK Q2eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date; bh=fe71k8uq1G4lh4WcEPR3DJJf0ESdsaHNDOCzu18RFo0=; b=kQT5Lego7FYpxP4mlRY0O/GNDljhwL4HLFHg9Fh2+zvzVZE34phGBC+QNp7ohbh+G4 FIbeIDGd0UExf7C+fLdXNKXGmEPXByOE3t5XYGNgtTw/51qscHvRtyAh8/C5xdWPwZSX f80YlCnfJNX55uiY1ItQ2Jbj3XroXE4FoEWs7g9i/KUeT1n8E2V6X8Vc0pc7aNAzarbX QN30xkEMQfabQZ9V3rTCZ/+j4O2rR1KWJfmbB+3jRNSHkEsFTB7J6eUpmGqkbZ/MYnW3 ZFZ7Cl3QzOJ460gfbaXsC72HCHXu7hvCZccNZRmij8abMRZagH75zeizUA3rNDovjvgd pVDA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j3si10675207eje.93.2020.11.18.06.08.30; Wed, 18 Nov 2020 06:08:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726929AbgKROEd (ORCPT + 99 others); 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`