From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: tpmdd-devel@lists.sourceforge.net
Cc: linux-security-module@vger.kernel.org,
Peter Huewe <peterhuewe@gmx.de>,
Marcel Selhorst <tpmdd@selhorst.net>,
Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tpm: fix type issues in tpm_getcap()
Date: Wed, 1 Feb 2017 20:30:58 +0200 [thread overview]
Message-ID: <20170201183058.ubnf7wfctlryqy6v@intel.com> (raw)
In-Reply-To: <20170201181845.bsy3pfdmryqm4zgb@intel.com>
On Wed, Feb 01, 2017 at 08:18:45PM +0200, Jarkko Sakkinen wrote:
> On Wed, Feb 01, 2017 at 07:53:47PM +0200, 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>
>
> This is the only mandatory fix for the next pull request and 4.11.
I mean from the reported sparse errors.
/Jarkko
next prev parent reply other threads:[~2017-02-01 18:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-01 17:53 [PATCH] tpm: fix type issues in tpm_getcap() Jarkko Sakkinen
2017-02-01 18:18 ` Jarkko Sakkinen
2017-02-01 18:30 ` Jarkko Sakkinen [this message]
2017-02-01 18:40 ` Jarkko Sakkinen
2017-02-02 13:50 ` Jarkko Sakkinen
2017-02-03 12:54 ` [tpmdd-devel] " Nayna
2017-02-03 18:15 ` Jarkko Sakkinen
2017-02-03 18:46 ` Nayna
2017-02-03 19:06 ` Jarkko Sakkinen
2017-02-03 13:48 ` Nayna
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=20170201183058.ubnf7wfctlryqy6v@intel.com \
--to=jarkko.sakkinen@linux.intel.com \
--cc=jgunthorpe@obsidianresearch.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=peterhuewe@gmx.de \
--cc=tpmdd-devel@lists.sourceforge.net \
--cc=tpmdd@selhorst.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox