From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jarkko Sakkinen Subject: Re: [PATCH 08/23] TPMLIB: Break TPM bits out of security/keys/trusted.c Date: Fri, 24 Aug 2018 11:49:30 +0300 Message-ID: <20180824084930.GA10266@linux.intel.com> References: <153486700916.13066.12870860668352070081.stgit@warthog.procyon.org.uk> <153486706322.13066.3105842100625841410.stgit@warthog.procyon.org.uk> <20180824075227.GG3584@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20180824075227.GG3584-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tpmdd-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: David Howells Cc: linux-security-module-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, keyrings-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-integrity-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, denkenz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org List-Id: tpmdd-devel@lists.sourceforge.net On Fri, Aug 24, 2018 at 10:52:27AM +0300, Jarkko Sakkinen wrote: > On Tue, Aug 21, 2018 at 04:57:43PM +0100, David Howells wrote: > > Break the TPM bits out of security/keys/trusted.c into their own call wrapper > > library. > > > > Signed-off-by: David Howells > > I think the very first steps that we should take would be to make TPM > subsystem to use struct tpm_buf internally for everything and convert > tpm_send() to take tpm_buf instead of a raw buffer. > > For TPM 2.0 the subsystem already uses tpm_buf. I remember Tomas Winkler > working on to do the same for TPM 1.x. > > After that it would make sense to convert TPM 1.x to use struct tpm_buf to > construct commands. > > After all of this is done it is possible to evaluate these changes. > > BTW right now there is call wrapper interface provided by the TPM > subsystem for TPM 2.0 trusted keys. Not sure if this has been the > right design choice. TPM 1.x and TPM 2.0 trusted keys implementations > live in different subsystems ATM, which at least somewhat wrong. Tomas' patches are scattered here: https://patchwork.kernel.org/patch/10261169/ I could rebase them and make a patch set out of them when I have time. /Jarkko ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot