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=-8.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,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 1B3D6C04AB4 for ; Fri, 17 May 2019 06:51:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D9194206A3 for ; Fri, 17 May 2019 06:51:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727704AbfEQGvT (ORCPT ); Fri, 17 May 2019 02:51:19 -0400 Received: from mx2.suse.de ([195.135.220.15]:35536 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726871AbfEQGvS (ORCPT ); Fri, 17 May 2019 02:51:18 -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 B7DE8AD78; Fri, 17 May 2019 06:51:17 +0000 (UTC) Date: Fri, 17 May 2019 08:51:16 +0200 From: Petr Vorel To: Mimi Zohar Cc: linux-integrity , ltp@lists.linux.it Subject: Re: [PATCH] ima: skip verifying TPM 2.0 PCR values Message-ID: <20190517065116.GA8170@dell5510> Reply-To: Petr Vorel References: <1558041162.3971.2.camel@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1558041162.3971.2.camel@linux.ibm.com> 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 Mimi, > TPM 1.2 exported the PCRs. Reading the TPM 2.0 PCRs requires a > userspace application. For now, skip this test. > Signed-off-by: Mimi Zohar Acked-by: Petr Vorel > --- > testcases/kernel/security/integrity/ima/tests/ima_tpm.sh | 8 ++++++++ > 1 file changed, 8 insertions(+) > diff --git a/testcases/kernel/security/integrity/ima/tests/ima_tpm.sh b/testcases/kernel/security/integrity/ima/tests/ima_tpm.sh > index 0ffc3c02247d..ebe4b4c360e4 100755 > --- a/testcases/kernel/security/integrity/ima/tests/ima_tpm.sh > +++ b/testcases/kernel/security/integrity/ima/tests/ima_tpm.sh > @@ -88,6 +88,14 @@ test2() > tst_res TINFO "verify PCR values" > tst_check_cmds evmctl > + local tpm_description="/sys/class/tpm/tpm0/device/description" > + if [ -f "$tpm_description" ]; then > + if grep -q "^\TPM 2.0" $tpm_description; then I guess the backslash in "^\TPM 2.0" is a typo. If yes, no need to repost, I'll fix it when applying your patch. + I'd prefer join 2 ifs into single one, but that's just matter of preference, not important. > + tst_res TCONF "TPM 2.0 enabled, but not supported" > + return 0 > + fi > + fi > + > tst_res TINFO "evmctl version: $(evmctl --version)" > local pcrs_path="/sys/class/tpm/tpm0/device/pcrs" Thanks for your fix. Kind regards, Petr From mboxrd@z Thu Jan 1 00:00:00 1970 From: Petr Vorel Date: Fri, 17 May 2019 08:51:16 +0200 Subject: [LTP] [PATCH] ima: skip verifying TPM 2.0 PCR values In-Reply-To: <1558041162.3971.2.camel@linux.ibm.com> References: <1558041162.3971.2.camel@linux.ibm.com> Message-ID: <20190517065116.GA8170@dell5510> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ltp@lists.linux.it Hi Mimi, > TPM 1.2 exported the PCRs. Reading the TPM 2.0 PCRs requires a > userspace application. For now, skip this test. > Signed-off-by: Mimi Zohar Acked-by: Petr Vorel > --- > testcases/kernel/security/integrity/ima/tests/ima_tpm.sh | 8 ++++++++ > 1 file changed, 8 insertions(+) > diff --git a/testcases/kernel/security/integrity/ima/tests/ima_tpm.sh b/testcases/kernel/security/integrity/ima/tests/ima_tpm.sh > index 0ffc3c02247d..ebe4b4c360e4 100755 > --- a/testcases/kernel/security/integrity/ima/tests/ima_tpm.sh > +++ b/testcases/kernel/security/integrity/ima/tests/ima_tpm.sh > @@ -88,6 +88,14 @@ test2() > tst_res TINFO "verify PCR values" > tst_check_cmds evmctl > + local tpm_description="/sys/class/tpm/tpm0/device/description" > + if [ -f "$tpm_description" ]; then > + if grep -q "^\TPM 2.0" $tpm_description; then I guess the backslash in "^\TPM 2.0" is a typo. If yes, no need to repost, I'll fix it when applying your patch. + I'd prefer join 2 ifs into single one, but that's just matter of preference, not important. > + tst_res TCONF "TPM 2.0 enabled, but not supported" > + return 0 > + fi > + fi > + > tst_res TINFO "evmctl version: $(evmctl --version)" > local pcrs_path="/sys/class/tpm/tpm0/device/pcrs" Thanks for your fix. Kind regards, Petr