From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Stefan Berger <stefanb@linux.vnet.ibm.com>
Cc: linux-security-module@vger.kernel.org,
tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [tpmdd-devel] [PATCH] tpm: fix a sparse error in tpm-sysfs.c
Date: Wed, 1 Feb 2017 10:08:39 +0200 [thread overview]
Message-ID: <20170201080839.l46vyziwwgusnu7a@intel.com> (raw)
In-Reply-To: <20170131203714.phz6dpmbyaynbs44@intel.com>
On Tue, Jan 31, 2017 at 10:37:14PM +0200, Jarkko Sakkinen wrote:
> On Tue, Jan 31, 2017 at 01:43:59PM -0500, Stefan Berger wrote:
> > drivers/char/tpm/tpm-sysfs.c:161:25: warning: expression using sizeof bool
> >
> > Fixes: c659af78eb7b ("tpm: Check size of response before accessing data")
> > Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
> > ---
> > drivers/char/tpm/tpm.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h
> > index bff37be..6b4e7aa 100644
> > --- a/drivers/char/tpm/tpm.h
> > +++ b/drivers/char/tpm/tpm.h
> > @@ -281,7 +281,7 @@ struct permanent_flags_t {
> > typedef union {
> > struct permanent_flags_t perm_flags;
> > struct stclear_flags_t stclear_flags;
> > - bool owned;
> > + __u8 owned;
> > __be32 num_pcrs;
> > struct tpm_version_t tpm_version;
> > struct tpm_version_1_2_t tpm_version_1_2;
> > --
> > 2.4.3
>
> A better description would be:
>
> The field owned has wrong sized type. This commit fixes the
> issue.
>
> ?
>
> /Jarkko
And doesn't owned print invalid results on a big endian system
i.e. 0x1000000? The commit message needs to be rewritten to capture
the problem.
/Jarkko
next prev parent reply other threads:[~2017-02-01 8:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-31 18:43 [PATCH] tpm: fix a sparse error in tpm-sysfs.c Stefan Berger
2017-01-31 20:37 ` Jarkko Sakkinen
2017-02-01 8:08 ` Jarkko Sakkinen [this message]
2017-02-01 11:17 ` [tpmdd-devel] " Jarkko Sakkinen
2017-02-01 12:00 ` Jarkko Sakkinen
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=20170201080839.l46vyziwwgusnu7a@intel.com \
--to=jarkko.sakkinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=stefanb@linux.vnet.ibm.com \
--cc=tpmdd-devel@lists.sourceforge.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;
as well as URLs for NNTP newsgroup(s).