lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <D3RKZJGWMFY4.3CHBC8OBPQ3SA@kernel.org>
Date: Wed, 28 Aug 2024 16:32:31 +0300
From: "Jarkko Sakkinen" <jarkko@...nel.org>
To: "Michal Suchanek" <msuchanek@...e.de>, <linux-integrity@...r.kernel.org>
Cc: "Peter Huewe" <peterhuewe@....de>, "Jason Gunthorpe" <jgg@...pe.ca>,
 "Shuah Khan" <shuah@...nel.org>, <linux-kernel@...r.kernel.org>,
 <linux-kselftest@...r.kernel.org>
Subject: Re: [PATCH 2/2] selftests: tpm2: test_smoke: Run only when TPM2 is
 avaialable.

On Wed Aug 28, 2024 at 2:23 PM EEST, Michal Suchanek wrote:
> Since Linux 5.6 tpm_version_major sysfs file is avaialble which gives
> the TPM version.
>
> Using this file the test can be skipped on systems with TPM 1.2.
>
> Signed-off-by: Michal Suchanek <msuchanek@...e.de>
> ---
>  tools/testing/selftests/tpm2/test_smoke.sh | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/tools/testing/selftests/tpm2/test_smoke.sh b/tools/testing/selftests/tpm2/test_smoke.sh
> index 58af963e5b55..e5e3386077d9 100755
> --- a/tools/testing/selftests/tpm2/test_smoke.sh
> +++ b/tools/testing/selftests/tpm2/test_smoke.sh
> @@ -5,5 +5,7 @@
>  ksft_skip=4
>  
>  [ -e /dev/tpm0 ] || exit $ksft_skip
> +read tpm_version < /sys/class/tpm/tpm0/tpm_version_major
> +[ "$tpm_version" == 2 ] || exit $ksft_skip
>  
>  python3 -m unittest -v tpm2_tests.SmokeTest

Thanks, I tagged and reviewed the patches:

https://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git/log/

Reviewed-by: Jarkko Sakkinen <jarkko@...nel.org>

BR, Jarkko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ