Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1037419imu; Thu, 20 Dec 2018 09:06:50 -0800 (PST) X-Google-Smtp-Source: AFSGD/VNTilbiB8UGW7JHzTx1yiAsV+yzuWXGMJlCjeP18eNorBxa+paanWeARdocZBfFO/5XEdu X-Received: by 2002:a62:6f88:: with SMTP id k130mr24831080pfc.234.1545325610238; Thu, 20 Dec 2018 09:06:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545325610; cv=none; d=google.com; s=arc-20160816; b=DH6wbSFjCbznHE0cOnpnqKAP7a86YBnqdloKJaXI0bkB4mcJ9mO6lxvD0YuHn2OFOQ wvp0OMapSz2jP4PuTpoDCF0w4JP5veG54p/ZnYNNTGbB4yD/nnDWNnZgaPo9pXvEJC+z iP9vM0wXcvdPyQMhmV2euiB85FEcd0fNqS8nvBLVal1W5MZWQeuF56WDgxesC1TUkQDn Nd62fzuAE5SgThidiByVnwRDcK6MAL9MsIALEJ4QB7hGnUSgscDMdg1suecCc7o4FuI6 YskLiGb4yrWH0tNSJJCkuFYzrtm2TfMuI8Ko14ZTMVhG0oCFDQCewLke2hyFv3rlR3zu opmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=AsrGz4wyhV6a5LoNUZXjMxkoDjCYbgsfI12XBltVZow=; b=EqnNh4j4y6x/5bNE1pHnsqJXsa4A+GZ0DmRtnlyj9h0gBi+C2OwFNME1e7yr3gqU7u MGJlAltOuaXhuPdciLHr9rguqEz60e4pouioy2jo7zsKNPAwV+gUHO/aIFhGBMyaFfiV CpAyFlCYYFfCUDRQ1vZuSuwOcsvwe/msJUlC/E/Sr2cZto8oKJ6DrO+ip4gQwIGR1Tmx CxEaKgS0T1NgrI5nBngbCiVgEM7r5MmgUg7psrgBiIFlsggFNZ2aVEpNafMDGSLH1LzP +48kisYgBdDAWLYA+7tq54K1Slz1yw5xSmM5gB5JnS4l4cpcxCajSTsv4BxBbrUhRiRa /XeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=qoPByeRz; 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 d12si19301843pgf.470.2018.12.20.09.06.34; Thu, 20 Dec 2018 09:06:50 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=qoPByeRz; 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 S1731398AbeLTQmQ (ORCPT + 99 others); Thu, 20 Dec 2018 11:42:16 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:36932 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730176AbeLTQmQ (ORCPT ); Thu, 20 Dec 2018 11:42:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=AsrGz4wyhV6a5LoNUZXjMxkoDjCYbgsfI12XBltVZow=; b=qoPByeRzbhFBCAixECZW50A9F 6DZbytuPCbBaBtCZ/lv1zSa1FHdsJqGCcRAn8I9n3KRtxGj/iPoAlTUjkrChc1lPh3+OlEMvWY9fr DOZ0bcqeIJcLJmBZv7Y4Z5XhRwg9w9HUL73GGDEcgWZnPjin/hCZK4Imd92Ke44zRp0oTxHYgLZXA T5pieI3NNYfamVUwIUH9G75Ac0khWpumPucyNPYUv/4UxiaUvU4JzJFBKF7tIr1EIWmpIWFNaYEIX eeRDsvAsHUK/GnZnz8QkHGNuKoL8vArLk0hLeO2FeCbz3HrfVlTKeaJqlwS5F0IOrNP8JgUP49ZQE S73tHFVIA==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1ga1On-0002fi-FJ; Thu, 20 Dec 2018 16:42:15 +0000 Subject: Re: [PATCH 0/1] RFC: Revamp admin-guide/tainted-kernels.rst to make it more comprehensible To: Thorsten Leemhuis , Jonathan Corbet Cc: linux-doc@vger.kernel.org, Linux Kernel Mailing List References: <20181217152043.9989-1-linux@leemhuis.info> <20181217112437.5fe868eb@lwn.net> <8f67a8ca-bf64-c537-843a-b03bcfc3dace@infradead.org> <96fc8865-c54f-5c6c-f6c8-d7a5a12735e6@leemhuis.info> From: Randy Dunlap Message-ID: Date: Thu, 20 Dec 2018 08:42:13 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <96fc8865-c54f-5c6c-f6c8-d7a5a12735e6@leemhuis.info> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/20/18 7:23 AM, Thorsten Leemhuis wrote: > Hi! Am 17.12.18 um 22:06 schrieb Randy Dunlap: >> On 12/17/18 10:24 AM, Jonathan Corbet wrote: >>> Here's an idea if you feel like improving this: rather than putting an >>> inscrutable program inline, add a taint_status script to scripts/ that >>> prints out the status in fully human-readable form, with the explanation >>> for every set bit. >> And some people prefer not adding tools that use python, perl, etc. > > Yeah, I know :-/ On twitter @apexo (thx!) suggested these two: > > dc -e"[00000000000000]n2o$(cat /proc/sys/kernel/tainted)p"|fold > -w1|tac|nl| grep -m 18 '.' > > (echo -n 000000000000000;(echo obase=2;cat > /proc/sys/kernel/tainted)|bc)|fold -w1|tac|nl| grep -m 18 '.' > > But it needs bc, which often is not installed by default :-/ Any as you > mentioned already: using Perl ( > > perl -e 'printf("%016b\n",)' < /proc/sys/kernel/tainted |fold > -w1|tac|nl > > ) also has it downsides. Having something that works in plain bash/sh > would be great... > > Nevertheless: I'm still inclined to put a one liner decode command into > tainted-kernels.rst so people can decode the file easily even if they do > not have attached script at hand. > >> E.g., I use this shell script (named 'chktaint', which could probably >> be done better): > > Many thx. Find a slightly improved version attached that directly prints > the reason. I assume that's more like what Jonathan had in mind. The > script now is also capable of decoding a value retrieved from > /proc/sys/kernel/tainted on another system. Thorsten: - drop the trailing spaces on multiple lines - s/follwing/following/ thanks. -- ~Randy