From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: YueHaibing <yuehaibing@huawei.com>
Cc: peterhuewe@gmx.de, jgg@ziepe.ca, arnd@arndb.de,
gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
linux-integrity@vger.kernel.org
Subject: Re: [PATCH -next] tpm: change the return type of calc_tpm2_event_size to size_t
Date: Tue, 19 Feb 2019 12:35:32 +0200 [thread overview]
Message-ID: <20190219103532.GA16707@linux.intel.com> (raw)
In-Reply-To: <820d3cf7-03ab-5434-5306-292b41aed860@huawei.com>
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@huawei.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.
[1] https://www.kernel.org/doc/html/v4.17/process/submitting-patches.html
/Jarkko
next prev parent reply other threads:[~2019-02-19 10:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-19 7:26 [PATCH -next] tpm: change the return type of calc_tpm2_event_size to size_t YueHaibing
2019-02-19 8:59 ` Jarkko Sakkinen
2019-02-19 9:15 ` YueHaibing
2019-02-19 10:35 ` Jarkko Sakkinen [this message]
2019-02-19 12:00 ` YueHaibing
2019-02-19 16:34 ` Jason Gunthorpe
2019-02-19 17:31 ` Jarkko Sakkinen
2019-02-20 2:13 ` YueHaibing
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190219103532.GA16707@linux.intel.com \
--to=jarkko.sakkinen@linux.intel.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=jgg@ziepe.ca \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterhuewe@gmx.de \
--cc=yuehaibing@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.