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.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no 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 600CEC2D0A8 for ; Wed, 30 Sep 2020 06:53:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 15F3320789 for ; Wed, 30 Sep 2020 06:53:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728157AbgI3Gxv (ORCPT ); Wed, 30 Sep 2020 02:53:51 -0400 Received: from mx2.suse.de ([195.135.220.15]:34754 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728149AbgI3Gxv (ORCPT ); Wed, 30 Sep 2020 02:53:51 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 45450ABAD; Wed, 30 Sep 2020 06:53:50 +0000 (UTC) Date: Wed, 30 Sep 2020 08:53:48 +0200 From: Petr Vorel To: Mimi Zohar Cc: ltp@lists.linux.it, Lakshmi Ramasubramanian , Mimi Zohar , Jarkko Sakkinen , linux-integrity@vger.kernel.org Subject: Re: [PATCH v3 2/4] IMA: Rewrite ima_boot_aggregate.c to new API Message-ID: <20200930065348.GB21664@dell5510> Reply-To: Petr Vorel References: <20200929165021.11731-1-pvorel@suse.cz> <20200929165021.11731-3-pvorel@suse.cz> <4c0ec7617f2686ffdd4565a05beddd34ebf0b6aa.camel@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4c0ec7617f2686ffdd4565a05beddd34ebf0b6aa.camel@linux.ibm.com> Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org Hi Mimi, > > > diff --git a/testcases/kernel/security/integrity/ima/tests/ima_tpm.sh b/testcases/kernel/security/integrity/ima/tests/ima_tpm.sh > > index c69f891f1..dc958eb5c 100755 > > --- a/testcases/kernel/security/integrity/ima/tests/ima_tpm.sh > > +++ b/testcases/kernel/security/integrity/ima/tests/ima_tpm.sh > > @@ -33,7 +33,7 @@ test1() > > tst_res TFAIL "bios boot aggregate is not 0" > > fi > > else > > - boot_aggregate=$(ima_boot_aggregate $tpm_bios | grep "boot_aggregate:" | cut -d':' -f2) > > + boot_aggregate=$(ima_boot_aggregate -f $tpm_bios | grep "sha1:" | cut -d':' -f2) > > if [ "$boot_hash" = "$boot_aggregate" ]; then > > tst_res TPASS "bios aggregate matches IMA boot aggregate" > > else > The original "ima" template is just the hash digest, without the > algorithm. Yes, but this code is output of ima_boot_aggregate.c. And code detecting old format is still working (verified on ima_measurements.sh with ima_tcb kernel parameter on 3.10). Kind regards, Petr From mboxrd@z Thu Jan 1 00:00:00 1970 From: Petr Vorel Date: Wed, 30 Sep 2020 08:53:48 +0200 Subject: [LTP] [PATCH v3 2/4] IMA: Rewrite ima_boot_aggregate.c to new API In-Reply-To: <4c0ec7617f2686ffdd4565a05beddd34ebf0b6aa.camel@linux.ibm.com> References: <20200929165021.11731-1-pvorel@suse.cz> <20200929165021.11731-3-pvorel@suse.cz> <4c0ec7617f2686ffdd4565a05beddd34ebf0b6aa.camel@linux.ibm.com> Message-ID: <20200930065348.GB21664@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, > > > diff --git a/testcases/kernel/security/integrity/ima/tests/ima_tpm.sh b/testcases/kernel/security/integrity/ima/tests/ima_tpm.sh > > index c69f891f1..dc958eb5c 100755 > > --- a/testcases/kernel/security/integrity/ima/tests/ima_tpm.sh > > +++ b/testcases/kernel/security/integrity/ima/tests/ima_tpm.sh > > @@ -33,7 +33,7 @@ test1() > > tst_res TFAIL "bios boot aggregate is not 0" > > fi > > else > > - boot_aggregate=$(ima_boot_aggregate $tpm_bios | grep "boot_aggregate:" | cut -d':' -f2) > > + boot_aggregate=$(ima_boot_aggregate -f $tpm_bios | grep "sha1:" | cut -d':' -f2) > > if [ "$boot_hash" = "$boot_aggregate" ]; then > > tst_res TPASS "bios aggregate matches IMA boot aggregate" > > else > The original "ima" template is just the hash digest, without the > algorithm. Yes, but this code is output of ima_boot_aggregate.c. And code detecting old format is still working (verified on ima_measurements.sh with ima_tcb kernel parameter on 3.10). Kind regards, Petr