[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c5008bcf-bfcd-c567-1d8e-993ff64f2191@huawei.com>
Date: Tue, 19 Feb 2019 20:00:11 +0800
From: YueHaibing <yuehaibing@...wei.com>
To: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
CC: <peterhuewe@....de>, <jgg@...pe.ca>, <arnd@...db.de>,
<gregkh@...uxfoundation.org>, <linux-kernel@...r.kernel.org>,
<linux-integrity@...r.kernel.org>
Subject: Re: [PATCH -next] tpm: change the return type of calc_tpm2_event_size
to size_t
On 2019/2/19 18:35, Jarkko Sakkinen wrote:
> On Tue, Feb 19, 2019 at 05:15:47PM +0800, YueHaibing wrote:
>> On 2019/2/19 16:59, Jarkko Sakkinen wrote:
>>> On Tue, Feb 19, 2019 at 03:26:18PM +0800, YueHaibing wrote:
>>>> calc_tpm2_event_size return size of the event which type is
>>>> size_t, If it is an invalid event, returns 0. And all the
>>>> caller use a size_t variable to check the return value, so
>>>> no need to convert to the return value type to int.
>>>>
>>>> Signed-off-by: YueHaibing <yuehaibing@...wei.com>
>>>
>>> I don't see this patch make any value.
>>
>> calc_tpm2_event_size return size_t 'size' which derive from u32 'event_field->event_size',
>>
>> convert it to int may result in truncation.
>
> Two remarks:
>
> - Your real name is formatted incorrectly. It should be like "Yue Haibig"
> as shown in [1].
> - If there is no actual regression, this change is useless.
Ok, Thank you.
>
> [1] https://www.kernel.org/doc/html/v4.17/process/submitting-patches.html
>
> /Jarkko
>
> .
>
Powered by blists - more mailing lists