[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1211991132.5964.10.camel@brick>
Date: Wed, 28 May 2008 09:12:12 -0700
From: Harvey Harrison <harvey.harrison@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Mimi Zohar <zohar@...ux.vnet.ibm.com>,
linux-kernel@...r.kernel.org, safford@...son.ibm.com,
serue@...ux.vnet.ibm.com, sailer@...son.ibm.com, zohar@...ibm.com,
Stephen Smalley <sds@...ho.nsa.gov>,
CaseySchaufler <casey@...aufler-ca.com>
Subject: Re: [RFC][Patch 2/5]integrity: TPM internel kernel interface
On Wed, 2008-05-28 at 00:17 -0700, Andrew Morton wrote:
> On Fri, 23 May 2008 11:03:41 -0400 Mimi Zohar <zohar@...ux.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists