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=-11.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS 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 D2863C433DB for ; Tue, 2 Feb 2021 16:20:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9DA5B64F55 for ; Tue, 2 Feb 2021 16:20:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236210AbhBBQUE (ORCPT ); Tue, 2 Feb 2021 11:20:04 -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-integrity@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 >