Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1571490
| Path | csiph.com!news.freedyn.net!open-news-network.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [tpmdd-devel] [PATCH] tpm: fix a sparse error in tpm-sysfs.c |
| Date | Wed, 01 Feb 2017 12:20:02 +0100 |
| Message-ID | <t617c-5dk-13@gated-at.bofh.it> (permalink) |
| References | <t5NnA-5bA-23@gated-at.bofh.it> <t5NnA-5bA-21@gated-at.bofh.it> <t5Y9j-3lP-9@gated-at.bofh.it> |
| X-Original-To | Stefan Berger <stefanb@linux.vnet.ibm.com> |
| X-Extloop1 | 1 |
| X-Ironport-Av | E=Sophos;i="5.33,319,1477983600"; d="scan'208";a="815779193" |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| Organization | Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo |
| User-Agent | Mutt/1.6.2-neo (2016-08-21) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 44 |
| X-Original-Cc | linux-security-module@vger.kernel.org, tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org |
| X-Original-Date | Wed, 1 Feb 2017 13:17:34 +0200 |
| X-Original-Message-ID | <20170201111734.77s4j7zuptik5epx@intel.com> |
| X-Original-References | <1485888239-7727-1-git-send-email-stefanb@linux.vnet.ibm.com> <20170131203714.phz6dpmbyaynbs44@intel.com> <20170201080839.l46vyziwwgusnu7a@intel.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1571490 |
Show key headers only | View raw
On Wed, Feb 01, 2017 at 10:08:39AM +0200, Jarkko Sakkinen wrote:
> 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.
Please ignore this, the conversion is done in tpm_getcap(). I'll
update the commit message.
/Jarkko
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH] tpm: fix a sparse error in tpm-sysfs.c Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-01-31 21:40 +0100
Re: [tpmdd-devel] [PATCH] tpm: fix a sparse error in tpm-sysfs.c Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-02-01 09:10 +0100
Re: [tpmdd-devel] [PATCH] tpm: fix a sparse error in tpm-sysfs.c Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-02-01 12:20 +0100
Re: [tpmdd-devel] [PATCH] tpm: fix a sparse error in tpm-sysfs.c Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-02-01 13:10 +0100
csiph-web