public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Harvey Harrison <harvey.harrison@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Mimi Zohar <zohar@linux.vnet.ibm.com>,
	linux-kernel@vger.kernel.org, safford@watson.ibm.com,
	serue@linux.vnet.ibm.com, sailer@watson.ibm.com,
	zohar@us.ibm.com, Stephen Smalley <sds@tycho.nsa.gov>,
	CaseySchaufler <casey@schaufler-ca.com>
Subject: Re: [RFC][Patch 2/5]integrity: TPM internel kernel interface
Date: Wed, 28 May 2008 09:12:12 -0700	[thread overview]
Message-ID: <1211991132.5964.10.camel@brick> (raw)
In-Reply-To: <20080528001739.54c630f9.akpm@linux-foundation.org>

On Wed, 2008-05-28 at 00:17 -0700, Andrew Morton wrote:
> On Fri, 23 May 2008 11:03:41 -0400 Mimi Zohar <zohar@linux.vnet.ibm.com> wrote:
> > +	index = cpu_to_be32(pcr_idx);
> > +	memcpy(data + 10, &index, 4);
> > +	rc = tpm_transmit(chip, data, sizeof(data));
> > +	if (rc > 0)
> > +		rc = be32_to_cpu(*((u32 *) (data + 6)));
> 
> An unaligned access.  What architectures is this hardware available on?
> 
> Harvey might be able to suggest a neater and better way of doing this?
> At least a get_unaligned(), I think?
> 

	rc = get_unaligned_be32((__be32 *)(data + 6));

If it was aligned:

	rc = be32_to_cpup((__be32 *)(data + 6));

Cheers,

Harvey




  reply	other threads:[~2008-05-28 16:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-23 15:03 [RFC][Patch 2/5]integrity: TPM internel kernel interface Mimi Zohar
2008-05-28  7:17 ` Andrew Morton
2008-05-28 16:12   ` Harvey Harrison [this message]
     [not found] <20080627131946.225566613@linux.vnet.ibm.com>
2008-06-27 16:22 ` [RFC][PATCH 2/5] integrity: " Mimi Zohar
2008-06-30 10:04   ` James Morris

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=1211991132.5964.10.camel@brick \
    --to=harvey.harrison@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=casey@schaufler-ca.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=safford@watson.ibm.com \
    --cc=sailer@watson.ibm.com \
    --cc=sds@tycho.nsa.gov \
    --cc=serue@linux.vnet.ibm.com \
    --cc=zohar@linux.vnet.ibm.com \
    --cc=zohar@us.ibm.com \
    /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