Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1573342
| From | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [tpmdd-devel] [PATCH] tpm: fix type issues in tpm_getcap() |
| Date | 2017-02-03 19:20 +0100 |
| Message-ID | <t6QCK-5b2-7@gated-at.bofh.it> (permalink) |
| References | <t67mj-x1-23@gated-at.bofh.it> <t6LD3-1GR-1@gated-at.bofh.it> |
| Organization | Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo |
On Fri, Feb 03, 2017 at 06:24:38PM +0530, Nayna wrote:
>
>
> On 02/01/2017 11:23 PM, Jarkko Sakkinen wrote:
> > There are two type issues associated with tpm_getcap().
> >
> > You must not do arithmetic with __be32 or __le32 types because sometimes
> > it results incorrect results. Calculations must be done only with data
> > that is in CPU byte order. This commit migrates tpm_getcap() to struct
> > tpm_buf in order to sort out these issues.
> >
> > The second issue is with struct cap_t as the size of the type bool is
> > assumed to be one byte. This commit sorts out the issue by changing the
> > type to u8.
> >
> > Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> > ---
> > v2:
> > - Use struct tpm_buf.
> > - Merge the type change of 'owned' to this patch.
> > drivers/char/tpm/tpm-interface.c | 33 ++++++++++++++++++---------------
> > drivers/char/tpm/tpm.h | 15 +--------------
> > 2 files changed, 19 insertions(+), 29 deletions(-)
> >
> > diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c
> > index 423938e..7af1e8c 100644
> > --- a/drivers/char/tpm/tpm-interface.c
> > +++ b/drivers/char/tpm/tpm-interface.c
> > @@ -480,31 +480,34 @@ static const struct tpm_input_header tpm_getcap_header = {
>
> Is tpm_getcap_header still needed ?
Definitely not, thanks. Are you able to try this out so I could
move forward with pull request?
/Jarkko
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] tpm: fix type issues in tpm_getcap() Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-02-01 19:00 +0100
Re: [PATCH] tpm: fix type issues in tpm_getcap() Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-02-01 19:20 +0100
Re: [PATCH] tpm: fix type issues in tpm_getcap() Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-02-01 19:40 +0100
Re: [PATCH] tpm: fix type issues in tpm_getcap() Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-02-01 19:50 +0100
Re: [PATCH] tpm: fix type issues in tpm_getcap() Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-02-02 15:00 +0100
Re: [tpmdd-devel] [PATCH] tpm: fix type issues in tpm_getcap() Nayna <nayna@linux.vnet.ibm.com> - 2017-02-03 14:00 +0100
Re: [tpmdd-devel] [PATCH] tpm: fix type issues in tpm_getcap() Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-02-03 19:20 +0100
Re: [tpmdd-devel] [PATCH] tpm: fix type issues in tpm_getcap() Nayna <nayna@linux.vnet.ibm.com> - 2017-02-03 19:50 +0100
Re: [tpmdd-devel] [PATCH] tpm: fix type issues in tpm_getcap() Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-02-03 20:10 +0100
Re: [tpmdd-devel] [PATCH] tpm: fix type issues in tpm_getcap() Nayna <nayna@linux.vnet.ibm.com> - 2017-02-03 14:50 +0100
csiph-web