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: <ss6mjfgbiq4z324uaamqfn7idcvv3hjjsictqqzfjvhftduexz@rvwrb6xsuy4j>
Date: Wed, 16 Apr 2025 11:08:36 +0200
From: Stefano Garzarella <sgarzare@...hat.com>
To: Yeoreum Yun <yeoreum.yun@....com>
Cc: peterhuewe@....de, jarkko@...nel.org, jgg@...pe.ca, 
	sudeep.holla@....com, stuart.yoder@....com, linux-integrity@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 2/2] tpm_crb_ffa: use dev_xx() macro to print log

On Tue, Apr 15, 2025 at 07:50:13PM +0100, Yeoreum Yun wrote:
>Instead of pr_xxx() macro, use dev_xxx() to print log.
>This patch changes some error log level to warn log level when
>the tpm_crb_ffa secure partition doesn't support properly but
>system can run without it.
>(i.e) unsupport of direct message ABI or unsupported ABI version
>
>Signed-off-by: Yeoreum Yun <yeoreum.yun@....com>
>---
> drivers/char/tpm/tpm_crb_ffa.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)

LGTM!

Reviewed-by: Stefano Garzarella <sgarzare@...hat.com>

>
>diff --git a/drivers/char/tpm/tpm_crb_ffa.c b/drivers/char/tpm/tpm_crb_ffa.c
>index fed775cf53ab..66b38b2cbdd5 100644
>--- a/drivers/char/tpm/tpm_crb_ffa.c
>+++ b/drivers/char/tpm/tpm_crb_ffa.c
>@@ -303,7 +303,7 @@ static int tpm_crb_ffa_probe(struct ffa_device *ffa_dev)
>
> 	if (!ffa_partition_supports_direct_recv(ffa_dev) &&
> 	    !ffa_partition_supports_direct_req2_recv(ffa_dev)) {
>-		pr_err("TPM partition doesn't support direct message receive.\n");
>+		dev_warn(&ffa_dev->dev, "partition doesn't support direct message receive.\n");
> 		return -EINVAL;
> 	}
>
>@@ -324,17 +324,17 @@ static int tpm_crb_ffa_probe(struct ffa_device *ffa_dev)
> 	rc = tpm_crb_ffa_get_interface_version(&tpm_crb_ffa->major_version,
> 					       &tpm_crb_ffa->minor_version);
> 	if (rc) {
>-		pr_err("failed to get crb interface version. rc:%d", rc);
>+		dev_err(&ffa_dev->dev, "failed to get crb interface version. rc:%d\n", rc);
> 		goto out;
> 	}
>
>-	pr_info("ABI version %u.%u", tpm_crb_ffa->major_version,
>+	dev_info(&ffa_dev->dev, "ABI version %u.%u\n", tpm_crb_ffa->major_version,
> 		tpm_crb_ffa->minor_version);
>
> 	if (tpm_crb_ffa->major_version != CRB_FFA_VERSION_MAJOR ||
> 	    (tpm_crb_ffa->minor_version > 0 &&
> 	    tpm_crb_ffa->minor_version < CRB_FFA_VERSION_MINOR)) {
>-		pr_err("Incompatible ABI version");
>+		dev_warn(&ffa_dev->dev, "Incompatible ABI version\n");
> 		goto out;
> 	}
>
>-- 
>LEVI:{C3F47F37-75D8-414A-A8BA-3980EC8A46D7}
>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ