From patchwork Tue Jul 7 15:16:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 11648961 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D7734739 for ; Tue, 7 Jul 2020 15:30:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C009A207F9 for ; Tue, 7 Jul 2020 15:30:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594135849; bh=69SI/+M+EsrYPGUsjvNrScM3WRasXNkolneBXj8DZOk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=H19qGWhbxf0pxEtSKxOXrnUFFiqLUY05PicYkYz32bT1kjbHS2GoWhz+3f8cHUeEu nvqWP3PwlGgYR9U8Rx/uNUxxeu0l+5HJdnr0Bv6L13SfePpAhwwdQzrFvgROHTF1nb Xu3N7l3gJP78JoJVt3MnaSqpKo4KflUlKr9TmfMQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728718AbgGGPap (ORCPT ); Tue, 7 Jul 2020 11:30:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:37314 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728799AbgGGPX6 (ORCPT ); Tue, 7 Jul 2020 11:23:58 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 251F52082F; Tue, 7 Jul 2020 15:23:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594135437; bh=69SI/+M+EsrYPGUsjvNrScM3WRasXNkolneBXj8DZOk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ocPc7N5dSK6V6EHsGschyl3xU0LGyVbSaYwdf9+7mH0QyxQCiVIkHlZ7Fwz3hNOiw 2ZxmQ9ugNKL7AeI/D5DwscGrNIDd9RYlF2EwVy613tm76YOlIXFVF+Xj1/xj6/5cE2 07Mc0DDx6pJBP8VrREmIF736wRslSIjLYZ0XwrLE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tadeusz Struk , linux-integrity@vger.kernel.org, linux-kselftest@vger.kernel.org, Jarkko Sakkinen , Shuah Khan Subject: [PATCH 5.7 041/112] Revert "tpm: selftest: cleanup after unseal with wrong auth/policy test" Date: Tue, 7 Jul 2020 17:16:46 +0200 Message-Id: <20200707145802.953085875@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200707145800.925304888@linuxfoundation.org> References: <20200707145800.925304888@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org From: Jarkko Sakkinen commit 5be206eaac9a68992fc3b06fb5dd5634e323de86 upstream. The reverted commit illegitly uses tpm2-tools. External dependencies are absolutely forbidden from these tests. There is also the problem that clearing is not necessarily wanted behavior if the test/target computer is not used only solely for testing. Fixes: a9920d3bad40 ("tpm: selftest: cleanup after unseal with wrong auth/policy test") Cc: Tadeusz Struk Cc: stable@vger.kernel.org Cc: linux-integrity@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Signed-off-by: Jarkko Sakkinen Signed-off-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman --- tools/testing/selftests/tpm2/test_smoke.sh | 5 ----- 1 file changed, 5 deletions(-) --- a/tools/testing/selftests/tpm2/test_smoke.sh +++ b/tools/testing/selftests/tpm2/test_smoke.sh @@ -3,8 +3,3 @@ python -m unittest -v tpm2_tests.SmokeTest python -m unittest -v tpm2_tests.AsyncTest - -CLEAR_CMD=$(which tpm2_clear) -if [ -n $CLEAR_CMD ]; then - tpm2_clear -T device -fi From patchwork Tue Jul 7 15:16:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 11648955 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 90692739 for ; Tue, 7 Jul 2020 15:30:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7030020663 for ; Tue, 7 Jul 2020 15:30:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594135844; bh=20y4Mugg4uM0Zxy27gW+xkoeKE5+EVAkevoG4qqLK3M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=vcIONpFPEbtpKCjHXfiuAnwhj+VpFiEC3F+1Qe3sdw4ga5TfFfogURM1n59K6yEw+ IHT7sIhXPRFZS+TQo8LSd+9KaL9M/WEwf09ccPcF7rNZbUGBDUJ5XXLeXfdys9N+sW 6Xe61noGyy33vzsuGUDg6KL4v5HB2z5EVtwMdVvA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729525AbgGGPYB (ORCPT ); Tue, 7 Jul 2020 11:24:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:37400 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730024AbgGGPYA (ORCPT ); Tue, 7 Jul 2020 11:24:00 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7B95120853; Tue, 7 Jul 2020 15:23:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594135440; bh=20y4Mugg4uM0Zxy27gW+xkoeKE5+EVAkevoG4qqLK3M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qb2pCbZbA3o3x6sHsaMyQmd0poSoXzZ2whmuKXPMb9ZTmCsoQ0Bhwwn2TasKLPRjU EV7COvI4w2sKyh4ywyIALGD/g4EOGwj9zqiX2SOOT95pGy8xxtjMCA1vNyuEJS+Gox bDQH+3y0SprHqJsyP3Kh31XEJeepORDJYcPvLrZI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, linux-integrity@vger.kernel.org, linux-kselftest@vger.kernel.org, Jarkko Sakkinen , Shuah Khan Subject: [PATCH 5.7 042/112] selftests: tpm: Use /bin/sh instead of /bin/bash Date: Tue, 7 Jul 2020 17:16:47 +0200 Message-Id: <20200707145803.000133983@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200707145800.925304888@linuxfoundation.org> References: <20200707145800.925304888@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org From: Jarkko Sakkinen commit 377ff83083c953dd58c5a030b3c9b5b85d8cc727 upstream. It's better to use /bin/sh instead of /bin/bash in order to run the tests in the BusyBox shell. Fixes: 6ea3dfe1e073 ("selftests: add TPM 2.0 tests") Cc: stable@vger.kernel.org Cc: linux-integrity@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Signed-off-by: Jarkko Sakkinen Signed-off-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman --- tools/testing/selftests/tpm2/test_smoke.sh | 2 +- tools/testing/selftests/tpm2/test_space.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- a/tools/testing/selftests/tpm2/test_smoke.sh +++ b/tools/testing/selftests/tpm2/test_smoke.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) python -m unittest -v tpm2_tests.SmokeTest --- a/tools/testing/selftests/tpm2/test_space.sh +++ b/tools/testing/selftests/tpm2/test_space.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) python -m unittest -v tpm2_tests.SpaceTest