Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp669549pxb; Tue, 2 Feb 2021 15:01:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJyKMdOdjkoeYGwUMMPwf/j4ium6a9erRwaiqliHkNdSVgbEsrvHn+5Pd/NnoaaCslsnStJF X-Received: by 2002:a50:baaa:: with SMTP id x39mr346829ede.37.1612306900595; Tue, 02 Feb 2021 15:01:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612306900; cv=none; d=google.com; s=arc-20160816; b=JFw9PJtE/6Nk3W3m4XLcx0VmrvAyAXppMpqI7gq7PmcxucC5DlTaaoSqWsThXI9yWa ebqnisNToDIOvSLQ5xDQet3wDP03uflJRMGUBuG/Tgmhk8HXAHZHVdkCIsoZoLh/KLgS VuQoAShM02ZlNwDqsGOOLjQSkrLkJBSRFH19HZFv46RhUv7KXUwisLh39hG5Ps8Ifv2q skyjTbzxI4VYDBSLc4kkH4S8KdK28Ge2sJija0siYNsbFQoFQxpFL2S9i9t969J89Scw k4d5u0s0LNvxDL7l2NN90eEXidQA6PI4OsJ2/Arn5LbB6UPDDF+nCKI/4APmXQ19rXGo Mwwg== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=jYPZ3qrxmIX8UclrF/68dvZW4LU68ZDAszum2TOZ71Y=; b=HbjmjCnQl4dBppjJM6ITvdW1YahJ5ayJqF0bZ/R8drXyT1/MqjW0SbU4GtQw8n19xG 14wiNrjRRhmrw/LVWujrDAbo0kGDJa51A6M23KCYvX46jhgiw2uWHv2NBVo6Gw5Cs7y3 SnMKsV8dPUVdtxTWXCvgmf0mwbNRAYEbpn44pB+He5luCXkpEh9Sao5iiBX4SLrN0YaP Z8z7+ZW4O8SdhoIJ+Ps3R56O5a37QjjiI3cFg9Akpm2nZjBW5NQOuK/Dge8h+o5YtzLl jMcJJMfttXdK1alknC31pIsfpUnpgXHDpMPqXnvxHwNZUvI9bliolINwtHFO+xiLIVsK njWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=awb7QjyJ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a17si112572edn.146.2021.02.02.15.01.16; Tue, 02 Feb 2021 15:01:40 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=awb7QjyJ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236223AbhBBQUR (ORCPT + 99 others); Tue, 2 Feb 2021 11:20:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:54858 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236131AbhBBQSW (ORCPT ); Tue, 2 Feb 2021 11:18:22 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 65F0864F65; Tue, 2 Feb 2021 16:17:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612282661; bh=nb+F01HMLRbj+cnqYSMEzMNAlToI/VhoRjb/1UPO14o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=awb7QjyJEyWVbjnGn/Mhv+3amTQfNDdW5oLwCYeY0+pF87JCTfQnE5VFAlFWGfXEy 7oD3w5MWDGPKQ6ZHQGm6VbKwhUSIowuGhzLrgXJoe4Vp94x/RvzkhPFmuDuOsAW6pY d16+y1zXDJCBuUJYinBwNcS/IW8wtuZJhd++vdnsgu6Uo/wNAUbVLlHX5MHiHtVFkE cNq+tSvbruwksHhvxADr2b6Z6xg6yalPyhq5r+1hkx9S4MRyZUHR7wip57UDpvuqQw 7R5Se4QM3b3TbIMGMdsvN3oK+rGV3heiT1fgkLBHwjTyBNkMR9M15LDaHP70IjK5CW FzedsnaOEljLA== Date: Tue, 2 Feb 2021 18:17:34 +0200 From: Jarkko Sakkinen To: James Bottomley Cc: Guenter Roeck , =?utf-8?Q?=C5=81ukasz?= Majczak , Peter Huewe , Jason Gunthorpe , linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, Radoslaw Biernacki , Marcin Wojtas , Alex Levin Subject: Re: [PATCH] tpm_tis: Add missing start/stop_tpm_chip calls Message-ID: References: <20210123014247.989368-1-lma@semihalf.com> <20210125171846.GA31929@roeck-us.net> <7a702108-ec9e-b2e2-be89-3590437c0eb5@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 30, 2021 at 04:41:13PM -0800, James Bottomley wrote: > On Sat, 2021-01-30 at 15:49 -0800, Guenter Roeck wrote: > > On 1/29/21 2:59 PM, Jarkko Sakkinen wrote: > > > On Tue, Jan 26, 2021 at 04:46:07PM +0100, Ɓukasz Majczak wrote: > > > > Hi Jarkko, Guenter > > > > > > > > Yes, here are the logs when failure occurs - > > > > https://gist.github.com/semihalf-majczak-lukasz/1575461f585f1e7fb1e9366b8eceaab9 > > > > Look for a phrase "TPM returned invalid status" > > > > > > > > Guenter - good suggestion - I will try to keep it as tight as > > > > possible. > > > > > > > > Best regards, > > > > Lukasz > > > > > > Is it possible for you try out with linux-next? Thanks. It's a > > > known issue, which ought to be fixed by now. > > > > > > The log message is harmless, it'a warning not panic, and does not > > > endanger system stability. WARN()'s always dump stack trace. No > > > oops is happening. > > > > > > > There is a note in the kernel documentation which states: > > > > Note that the WARN()-family should only be used for "expected to > > be unreachable" situations. If you want to warn about "reachable > > but undesirable" situations, please use the pr_warn()-family of > > functions. > > It fits the definition. The warning only triggers if the access is in > the wrong locality, which should be impossible, so the warning should > be unreachable. It's an overkill. Even in perfectly working kernel it's not impossible, as sometimes hardware gives faulty data. I think that it also lacks the useful information i.e. the status code. I would useful WARN() only if the driver state could suffer. In this case it doesn't. It only results failing transfer but kernel state is still legit. /Jarkko >