[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161124210637.6dspokalv7tcql26@intel.com>
Date: Thu, 24 Nov 2016 23:06:37 +0200
From: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
To: Nayna Jain <nayna@...ux.vnet.ibm.com>
Cc: tpmdd-devel@...ts.sourceforge.net, peterhuewe@....de,
tpmdd@...horst.net, jgunthorpe@...idianresearch.com,
linux-security-module@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 2/3] tpm: enhance read_log_of() to support Physical
TPM event log
On Wed, Nov 23, 2016 at 12:27:36PM -0500, Nayna Jain wrote:
> - memcpy(log->bios_event_log, __va(*basep), *sizep);
> + if (of_property_match_string(np, "compatible", "IBM,vtpm") < 0)
> + memcpy(chip->log.bios_event_log, __va(be64_to_cpup(basep)),
> + log_size);
> + else
> + memcpy(chip->log.bios_event_log, __va(*basep), log_size);
This does not look good. You should be able rearrange your code in a way
that you only have only one memcpy call.
/Jarkko
Powered by blists - more mailing lists