[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <76d46ffbad294a6385779c29c4e5cafd@huawei.com>
Date: Tue, 14 Apr 2020 11:55:43 +0000
From: Roberto Sassu <roberto.sassu@...wei.com>
To: Tianjia Zhang <tianjia.zhang@...ux.alibaba.com>,
"peterhuewe@....de" <peterhuewe@....de>,
"jarkko.sakkinen@...ux.intel.com" <jarkko.sakkinen@...ux.intel.com>,
"jgg@...pe.ca" <jgg@...pe.ca>, "arnd@...db.de" <arnd@...db.de>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"zhang.jia@...ux.alibaba.com" <zhang.jia@...ux.alibaba.com>
CC: "linux-integrity@...r.kernel.org" <linux-integrity@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Silviu Vlasceanu" <Silviu.Vlasceanu@...wei.com>
Subject: RE: [PATCH] tpm: fix wrong return value in tpm_pcr_extend
> -----Original Message-----
> From: linux-integrity-owner@...r.kernel.org [mailto:linux-integrity-
> owner@...r.kernel.org] On Behalf Of Tianjia Zhang
> Sent: Tuesday, April 14, 2020 1:42 PM
> To: peterhuewe@....de; jarkko.sakkinen@...ux.intel.com; jgg@...pe.ca;
> arnd@...db.de; gregkh@...uxfoundation.org; zhang.jia@...ux.alibaba.com
> Cc: linux-integrity@...r.kernel.org; linux-kernel@...r.kernel.org;
> tianjia.zhang@...ux.alibaba.com
> Subject: [PATCH] tpm: fix wrong return value in tpm_pcr_extend
>
> For the algorithm that does not match the bank, a positive
> value EINVAL is returned here. I think this is a typo error.
> It is necessary to return an error value.
Yes, thanks.
Reviewed-by: Roberto Sassu <roberto.sassu@...wei.com>
Roberto
HUAWEI TECHNOLOGIES Duesseldorf GmbH, HRB 56063
Managing Director: Li Peng, Li Jian, Shi Yanli
> Signed-off-by: Tianjia Zhang <tianjia.zhang@...ux.alibaba.com>
> ---
> drivers/char/tpm/tpm-interface.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-
> interface.c
> index a438b1206fcb..1621ce818705 100644
> --- a/drivers/char/tpm/tpm-interface.c
> +++ b/drivers/char/tpm/tpm-interface.c
> @@ -323,7 +323,7 @@ int tpm_pcr_extend(struct tpm_chip *chip, u32
> pcr_idx,
>
> for (i = 0; i < chip->nr_allocated_banks; i++) {
> if (digests[i].alg_id != chip->allocated_banks[i].alg_id) {
> - rc = EINVAL;
> + rc = -EINVAL;
> goto out;
> }
> }
> --
> 2.17.1
Powered by blists - more mailing lists