From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Cc: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
tpmdd-devel@lists.sourceforge.net,
linux-security-module@vger.kernel.org,
Peter Huewe <peterhuewe@gmx.de>,
Marcel Selhorst <tpmdd@selhorst.net>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tpm: fix byte order related arithmetic inconsistency in tpm_getcap()
Date: Thu, 11 May 2017 13:16:46 +0300 [thread overview]
Message-ID: <20170511101646.556aoezp77wlcrw7@intel.com> (raw)
In-Reply-To: <CAExDi1RODELLA+N4_5JS3LcDa5DN4q_imYwhw4hd4BHq1GFRBw@mail.gmail.com>
On Thu, May 11, 2017 at 01:41:15AM +0200, Luc Van Oostenryck wrote:
> On Wed, May 10, 2017 at 2:34 PM, Jarkko Sakkinen
> <jarkko.sakkinen@linux.intel.com> wrote:
>
> > Arithmetic should work but it's not a good practice to do additions,
> > substractions or multiplications in any other byte order than the CPU
> > byte order.
> >
> > sparse also complains about this.
> >
> > /Jarkko
>
> Arithmetic should work?
> let's try with 0x0080:
> in native order: 0x0080 + 0x0080 = 0x0100
> in reverse order: 0x8000 + 0x8000 = 0x0000 != swap16(0x0100)
>
> Or do I misunderstand what you mean by "arithmetic should work"?
>
> -- Luc Van Oostenryck
I was referring to the specific code snippet in tpm-interface.c.
/Jarkko
next prev parent reply other threads:[~2017-05-11 10:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-07 17:50 Jarkko Sakkinen
2017-05-09 14:13 ` Jarkko Sakkinen
2017-05-09 15:13 ` Jason Gunthorpe
2017-05-10 12:34 ` Jarkko Sakkinen
2017-05-10 23:41 ` Luc Van Oostenryck
2017-05-11 10:16 ` Jarkko Sakkinen [this message]
2017-05-15 11:36 ` [tpmdd-devel] " Jarkko Sakkinen
2017-05-15 15:39 ` Jason Gunthorpe
2017-05-24 16:59 ` 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=20170511101646.556aoezp77wlcrw7@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=luc.vanoostenryck@gmail.com \
--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
all inboxes | Powered by JetHome®