Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp776414pxb; Wed, 3 Feb 2021 18:23:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJw8PgVxC182QYp3kNNo6Sb1/JfZKeiQNj+2BWdt+K8uiR3uN5yCTbzaBK9JEMwyyG4i83Us X-Received: by 2002:a05:6402:3589:: with SMTP id y9mr6089411edc.344.1612405389470; Wed, 03 Feb 2021 18:23:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612405389; cv=none; d=google.com; s=arc-20160816; b=0/OtyUPIyT2qPjxRcanS2sTdYjgplvE5vgRyy8w2JJXM3qTrhRf3YHQYvYTEdHQpC/ nMeWTqw1WQsa1/OQeWTuRmHc3VQJ79gNaIhoeYIxv7sO438C4ke5memTmfzyA8BHZ11k 0EsBpTaoP+pKryTKqbhPDGM86FSOx+BbbIvdJVrBj7XUiLSIkIg3of9uABdE66Ms0mxq qNhWiwbANzNe7A3FKdKu3UaQpaPVJ1KPHqVwLROJ+2obwTRYhm1+xdaapfA6o5K0fwy8 b5s7wwbg6Ua7EDR5R4OTDhFN1Y+fpk2E5E1UYS60d+Sl/UpyQMMnRCcp5HoklJdUmPIe axJw== 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:message-id:subject:cc:to:from:date:dkim-signature; bh=6uZjHHreVWUAKfUU4E3taSaBgCZaAysfQmy1NV8TGZs=; b=RqE4B8urKZ1Va5QWe2qYz86ELe81k1Hl2Zh9xohSrAUREkzxTe47CQoe9XIY8sGD+H U6/UGdmL1DFGmFkQIbcKNA92dQ2G/wq0qAW7Bp/py7j/bJamVEsCxagGXbm9TAkKb+cg Ie3m1MGOe6IJZGlFRcwa8i/XBixyOUFmXZ7DDYX3nGY1OyxMe+vqFbxCWHixJsvPX+0z l/zrBvG95tC20XTbjxLEjrDg2/eLU7Ak7cI9nY/t07skjZAB4omhRq9dDBKrig/fe1tf BaOoU/OSaucUq0v094LawNRTdkNC/sZ6pAJckc8GIhmOslL483aFXkDoPaBemVKyfD8P 2ePg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=u6RbGKN2; 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 j19si2792276edw.550.2021.02.03.18.22.44; Wed, 03 Feb 2021 18:23:09 -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=u6RbGKN2; 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 S233134AbhBCXYx (ORCPT + 99 others); Wed, 3 Feb 2021 18:24:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:49728 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232745AbhBCXYw (ORCPT ); Wed, 3 Feb 2021 18:24:52 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 06E3464F67; Wed, 3 Feb 2021 23:24:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612394651; bh=1oyq9S0UA3DqFgitDJS5vC9pCBjSVxdBdG5M+j+s4ck=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=u6RbGKN2PpPnH/77HetyS4XjwNlHht+7hgk7IoPPjnhBQqrRuzXzzTFTobzzKa9Op SC4+/mBq+7EjjC/gHRbPR/wU+lgwqQFEtsN/RroL9GrFaSkLE7oMLN9SNmAYlp0UsU UiejZ9UzxrkKIH6eW67eHq8tezEK6PPKj+tVBrgxffPEGrp4j4IlY3oUkEUe2w7mYv yQg/iz3kIbdV3xJQ0By61BpalzYMIYDfYHtL7VYssD3dOgs3Cw1O6qMC3ht+AyBsgV J0fcp1m42uArAE2IHmZwH8oMjMprmSZLYbEhXFtQEBwmGHBjjzasAlfOqQstR1AM+W FlHNyRJwT4zkw== Date: Thu, 4 Feb 2021 01:24:04 +0200 From: Jarkko Sakkinen To: Lukasz Majczak Cc: Dirk Gouders , Guenter Roeck , James Bottomley , Tj , Peter Huewe , Jason Gunthorpe , linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, Radoslaw Biernacki , Marcin Wojtas , Alex Levin Subject: Re: [PATCH v3] tpm_tis: Add missing tpm_request/relinquish_locality calls Message-ID: References: <20210128130753.1283534-1-lma@semihalf.com> <20210202155139.521421-1-lma@semihalf.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 03, 2021 at 02:43:44PM +0100, Lukasz Majczak wrote: > Hi Jarkko, Dirk, > > Jarkko, > Thank you for your points - I will try to fix all you have mentioned. > I think it would be good to clarify a few things, before going with > the next version. Regarding use tpm_chip_start/stop() around > tpm2_probe() call - I have followed the similar way it is done in the > probe_itpm() function, where is also a call to tpm_tis_send_data() > guarded by request/release_locality(). I have tested it on the Samsung > Chromebook Pro (which reports TPM 1.2 / Cr50) and it was sufficient > (e.g. I didn't have to enable the clock) to get rid of a trace > mentioned in the commit message....but now writing these words I'm > starting to think that using tpm_chip_start/stop() could be safer from > a point of view of other TPMs... so if you suggest using > tpm_chip_start/stop() shall I also add it to the probe_itpm() (instead > of request/release_locality()) ? > > Dirk, > Thanks for the clarification. Regarding the issue you observe - I > wanted to address at first the one that is generating the trace > (please check the commit message) because it was leading to returning > an error in the tpm_tis_status() function causing TPM module not > initialized at all in the end - requesting locality before the call to > the tpm_tis_send_data() has helped in my case (my test environment). I > am aware of the second issue - "TPM interrupt not working, polling > instead", but as it is not as critical as the first one, I decided to > work on it later. > > Thank you once again for all your input and sorry for a confusion with > sending patches. NP, thanks for doing this. Just take your time and polish the cosmetic things. Especially for bug fixes a clean changelog is essential. > Best regards, > Lukasz /Jarkko