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=-7.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, USER_AGENT_MUTT 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 3732CC04AB4 for ; Fri, 17 May 2019 15:05:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 10C412083E for ; Fri, 17 May 2019 15:05:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729162AbfEQPFA (ORCPT ); Fri, 17 May 2019 11:05:00 -0400 Received: from mx2.suse.de ([195.135.220.15]:34936 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728935AbfEQPFA (ORCPT ); Fri, 17 May 2019 11:05:00 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 772F3AF3A; Fri, 17 May 2019 15:04:59 +0000 (UTC) Date: Fri, 17 May 2019 17:04:56 +0200 From: Petr Vorel To: Nayna Cc: Mimi Zohar , linux-integrity , ltp@lists.linux.it Subject: Re: [PATCH] ima: skip verifying TPM 2.0 PCR values Message-ID: <20190517150456.GA11796@dell5510> Reply-To: Petr Vorel References: <1558041162.3971.2.camel@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-integrity-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org Hi Nayna, ... > > + local tpm_description="/sys/class/tpm/tpm0/device/description" ... > I do not see a "description" file on either my PowerPC or x86 systems with > TPM 2.0.  Perhaps instead of testing for the "description" file, if the > "pcrs" file is not found, emit a more verbose informational message, for eg. > - "pcrs file is not found - either you are running a TPM 2.0, or having > sysfs failed to show pcrs for TPM 1.2" Some people are using /sys/class/tpm/tpm0/device/description [1] for testing TPM version. From the discussion on [1] I also got an expression that the file is not always presented. If there is really no reliable way to detect TPM version from sysfs (huh!) your approach would make sense for me. > Thanks & Regards, >       - Nayna Kind regards, Petr [1] https://github.com/tpm2-software/tpm2-tools/issues/604