lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170203181523.mu4hqhb7epqmthfd@intel.com>
Date:   Fri, 3 Feb 2017 20:15:23 +0200
From:   Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
To:     Nayna <nayna@...ux.vnet.ibm.com>
Cc:     tpmdd-devel@...ts.sourceforge.net,
        open list <linux-kernel@...r.kernel.org>,
        linux-security-module@...r.kernel.org
Subject: Re: [tpmdd-devel] [PATCH] tpm: fix type issues in tpm_getcap()

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@...ux.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ