Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp959282pxu; Wed, 2 Dec 2020 07:37:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJyMkfp8f/o95vHTbshibfvg7OvvO0lFx7xhgwTJiyVBjUPdBI/s8MLk3gjbrc1Tt3SbmvP0 X-Received: by 2002:a17:906:4f03:: with SMTP id t3mr346699eju.240.1606923456211; Wed, 02 Dec 2020 07:37:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606923456; cv=none; d=google.com; s=arc-20160816; b=akg5cpUCKoDZiXfK0BNFbFjmY9YZIw7O2Bs8iTK6s51T/Sgcetu+Q6bX1E5LqUxDGD /9PuzD5G5ikFTzD2fRFTzd+ovkHBDX1/LxrY9rm8f82LpbtOrmQ1ZezqJnIQPd0778Wd t+cLYnu7iql5O1O3TVpbjh8fz7z5R4M1Lu+SW20L7RMepOWVwavJyPHrb9VSknvnHjhb Q5TQayc25Wu1+NTKL3hKE8LmN34KwtfwUUKna8j7EG3mmxreCyCN4s7uOOfWQp0WKoZb uknwUUVZ4CWzISp84abAhJy/8sSoP1HE6kVH7k5IMnyxjZT73eAiLj7ZmB5bhgqQl2ki BtHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=/SwwEojpNGAx0b96a1lgp/TZ0J6PtymwTqTons2hcj4=; b=KKuljqawJyVA76TLlwDiywTm7xyHd/vp7Sz5cAsaEQlIPY2REElzXhkBi0d3024dLK gMTknlOCgzWeCmGzeHj3mEfrtv4piG3+bM/055R4rFvuaKeGl9AlFOpavnTvKpBIaRYc g9KFUuq41Jt54WrUJrjLQ4p4ZZij/QLjODd0GNBm1xzLfkI7HoJm7q0e58oj5ULuaBF2 WT8kfSKDbjrMAu/03OKJgtmobvFDbkfjX+vHzPPmfBo8c3APKePeO+TJjjl+nVuYVla9 Y2vyTXQPDiLR++ymhZf7xvN1kQqTk+OHr7qjs2vuY5giJTMB4SlKWbf+446opPO/w/Mk 4UCg== 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 g16si180922ejf.167.2020.12.02.07.37.12; Wed, 02 Dec 2020 07:37:36 -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 S1728468AbgLBPff (ORCPT + 99 others); Wed, 2 Dec 2020 10:35:35 -0500 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:54393 "EHLO relay1-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726113AbgLBPff (ORCPT ); Wed, 2 Dec 2020 10:35:35 -0500 X-Originating-IP: 90.43.98.209 Received: from rope.localdomain (astlambert-651-1-83-209.w90-43.abo.wanadoo.fr [90.43.98.209]) (Authenticated sender: m@thi.eu.com) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id EAC6E240003; Wed, 2 Dec 2020 15:34:48 +0000 (UTC) Received: by rope.localdomain (Postfix, from userid 1000) id 4AD7B513EA; Wed, 2 Dec 2020 16:34:48 +0100 (CET) From: Mathieu Chouquet-Stringer To: Jonathan Corbet Cc: Borislav Petkov , Mathieu Chouquet-Stringer , Stephen Kitt , Andrew Morton , Kees Cook , "Guilherme G. Piccoli" , Eric Biggers , Randy Dunlap , Qais Yousef , Naoki Hayama , Yue Hu , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] Update documentation to reflect what TAINT_CPU_OUT_OF_SPEC means nowadays Date: Wed, 2 Dec 2020 16:32:43 +0100 Message-Id: <20201202153244.709752-1-me@mathieu.digital> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Jonathan, Here's a patch updating the meaning of TAINT_CPU_OUT_OF_SPEC after Borislav introduced changes in a7e1f67ed29f and upcoming patches in tip. TAINT_CPU_OUT_OF_SPEC now means a bit more what it implies as the flag isn't set just because of a CPU misconfiguration or mismatch. 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 from userspace, drivers being used on non supported architectures, broken firmware, mismatched CPUs, ... Update documentation and script to reflect that. Signed-off-by: Mathieu Chouquet-Stringer --- Documentation/admin-guide/sysctl/kernel.rst | 2 +- Documentation/admin-guide/tainted-kernels.rst | 23 +++++++++++++++---- tools/debugging/kernel-chktaint | 2 +- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst index d4b32cc32bb7..edd89e2d3af7 100644 --- a/Documentation/admin-guide/sysctl/kernel.rst +++ b/Documentation/admin-guide/sysctl/kernel.rst @@ -1336,7 +1336,7 @@ ORed together. The letters are seen in "Tainted" line of Oops reports. ====== ===== ============================================================== 1 `(P)` proprietary module was loaded 2 `(F)` module was force loaded - 4 `(S)` SMP kernel oops on an officially SMP incapable processor + 4 `(S)` kernel running on an out of specification system 8 `(R)` module was force unloaded 16 `(M)` processor reported a Machine Check Exception (MCE) 32 `(B)` bad page referenced or some unexpected page flags diff --git a/Documentation/admin-guide/tainted-kernels.rst b/Documentation/admin-guide/tainted-kernels.rst index f718a2eaf1f6..ceeed7b0798d 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 an out of specification system 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,23 @@ 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 a processor or system that is out of + specification: hardware has been put into an unsupported configuration, + therefore proper execution cannot be guaranteed. + Kernel will be tainted if, for example: + + - on x86: PAE is forced through forcepae on intel CPUs (such as Pentium M) + which do not report PAE but may have a functional implementation, an SMP + kernel is running on non officially capable SMP Athlon CPUs, MSRs are + being poked at from userspace. + - on arm: kernel running on certain CPUs (such as Keystone 2) without + having certain kernel features enabled. + - on arm64: there are mismatched hardware features between CPUs, the + bootloader has booted CPUs in different modes. + - certain drivers are being used on non supported architectures (such as + scsi/snic on something else than x86_64, scsi/ips on non + x86/x86_64/itanium, have broken firmware settings for the + irqchip/irq-gic on arm64 ...). 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..607b2b280945 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 an out of specification system (#2)" fi T=`expr $T / 2` -- 2.28.0