All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: "Hon Ching(Vicky) Lo" <honclo@linux.vnet.ibm.com>
To: "Peter Hüwe" <PeterHuewe@gmx.de>
Cc: tpmdd-devel@lists.sourceforge.net,
	Ashley Lai <ashley@ashleylai.com>,
	Vicky Lo <honclo2014@gmail.com>,
	linux-kernel@vger.kernel.org,
	Joy Latten <jmlatten@linux.vnet.ibm.com>
Subject: Re: [PATCH v4 1/2] vTPM: support little endian guests
Date: Thu, 16 Jul 2015 13:54:15 -0400	[thread overview]
Message-ID: <1437069255.29298.5.camel@vtpm2014.ibm.com> (raw)
In-Reply-To: <201507132308.00824.PeterHuewe@gmx.de>

Hi Peter,


On Mon, 2015-07-13 at 23:08 +0200, Peter Hüwe wrote:
> Hi Vicky,
> 
> sorry for the late reply
> 
> 
> > This patch makes the code endianness independent. We defined a
> > macro do_endian_conversion to apply endianness to raw integers
> > in the event entries so that they will be displayed properly.
> > tpm_binary_bios_measurements_show() is modified for the display.
> > 
> > Signed-off-by: Hon Ching(Vicky) Lo <honclo@linux.vnet.ibm.com>
> > Signed-off-by: Joy Latten <jmlatten@linux.vnet.ibm.com>
> 
> > b/drivers/char/tpm/tpm_eventlog.h index e7da086..267bfbd 100644
> > --- a/drivers/char/tpm/tpm_eventlog.h
> > +++ b/drivers/char/tpm/tpm_eventlog.h
> > @@ -6,6 +6,12 @@
> >  #define MAX_TEXT_EVENT		1000	/* Max event string length */
> >  #define ACPI_TCPA_SIG		"TCPA"	/* 0x41504354 /'TCPA' */
> > 
> > +#ifdef CONFIG_PPC64
> > +#define do_endian_conversion(x) be32_to_cpu(x)
> > +#else
> > +#define do_endian_conversion(x) x
> > +#endif
> 
> 
> Why is this macro needed?
> shouldn't the be32_to_cpu macro already do correct thing?
> Or am I missing something here?
> 
> 
> Thanks,
> Peter
> 
The macro is defined to not do the conversion in the architecture
that does not need it.


Regards,
Vicky


  reply	other threads:[~2015-07-16 17:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-17 22:17 [PATCH v4 1/2] vTPM: support little endian guests Hon Ching(Vicky) Lo
2015-06-17 22:17 ` [PATCH v4 2/2] TPM: remove unnecessary little endian conversion Hon Ching(Vicky) Lo
2015-06-18 13:23   ` Ashley Lai
2015-06-29 18:52   ` Hon Ching(Vicky) Lo
2015-06-18 13:23 ` [PATCH v4 1/2] vTPM: support little endian guests Ashley Lai
2015-06-29 18:43 ` Hon Ching(Vicky) Lo
2015-06-29 18:51 ` Hon Ching(Vicky) Lo
2015-07-13 21:08 ` Peter Hüwe
2015-07-16 17:54   ` Hon Ching(Vicky) Lo [this message]
2015-07-16 18:43     ` Peter Hüwe
2015-07-17 20:07       ` Hon Ching(Vicky) Lo

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=1437069255.29298.5.camel@vtpm2014.ibm.com \
    --to=honclo@linux.vnet.ibm.com \
    --cc=PeterHuewe@gmx.de \
    --cc=ashley@ashleylai.com \
    --cc=honclo2014@gmail.com \
    --cc=jmlatten@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.