Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp5174600ybp; Mon, 14 Oct 2019 16:59:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqwLWW3XUabOR3DKs0wR9jo6PxhJRpI0+0AfZhKQfSkQay0DrVgNyImocxbqCrmrU5DCzUdC X-Received: by 2002:a50:ec91:: with SMTP id e17mr29982264edr.169.1571097562956; Mon, 14 Oct 2019 16:59:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571097562; cv=none; d=google.com; s=arc-20160816; b=dbolVTciWoAIAjSFMScYVAczOfyEZjJVHmZTAB4ApUgmEFS9FShmI0HTLO7jrB8dNt 9Ydu3QPUYxOzRj0LqE4u7UGIQbpNt74IDSR69FyV3J65jdHA1AK3l3epcCKGZEbI6s31 335245SXmwbY/0bFGMoQ1jLY7Zjle1aPWBW+PpcUfa5QfaUIH2JbA93+zlwzKW/OgS8/ UuN6oSG40Goqj7tJWccM9Cc/gQmpJo/RD0OTkzRp6IbO83G3m+5a4TRox0ANgfC9REH4 xXjP7ccYjmx2TMgFnTamdCsaz7NwJQm6hOerrVPdDal3146Cjnk4wmNGcHVkS8kf/ru8 LPzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=5nIFOFS2f/nzT//ko/HyVCumC8+2/jThCG9TqLrM8/w=; b=H0OdXUs/YZzWKJLOhHNTT6Q0Ib31iA1+Jxr1BLE4TuIeEM0m7IZdFh2Daj1e7sLdJ4 oxJp/g0+02Vi+Qyj1rqP2cez0XPgL/MOgqpxMClyuWZHEuSzLOQS6wAcfQJpTdaBdEfn eb8IIttRjvSNCx4FAGqgy0d6SyMQLU5WIHDm1zKCJn963ylQLAWudtLtQAyfeKsLxZuV nCqUtYXI3m8qLkWfEemTolZVhm1ymD4zKpj8tHDzIKneuRBIdct6Nuuwn1x/JDOb9jPN afuFDn2lBKFPI3b7h0Sn0m4OcGmiWKV27IqjJYhT7VRkU3DdnxpkqGA5fx1s1/7DjTjz vXzQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y71si12979529ede.135.2019.10.14.16.58.58; Mon, 14 Oct 2019 16:59:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388863AbfJNTeC (ORCPT + 99 others); Mon, 14 Oct 2019 15:34:02 -0400 Received: from mga14.intel.com ([192.55.52.115]:11242 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730297AbfJNTeB (ORCPT ); Mon, 14 Oct 2019 15:34:01 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Oct 2019 12:34:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,296,1566889200"; d="scan'208";a="370222922" Received: from kridax-mobl1.ger.corp.intel.com (HELO localhost) ([10.252.7.178]) by orsmga005.jf.intel.com with ESMTP; 14 Oct 2019 12:33:52 -0700 Date: Mon, 14 Oct 2019 22:33:50 +0300 From: Jarkko Sakkinen To: Sumit Garg Cc: dhowells@redhat.com, peterhuewe@gmx.de, keyrings@vger.kernel.org, linux-integrity@vger.kernel.org, linux-crypto@vger.kernel.org, linux-security-module@vger.kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, jgg@ziepe.ca, arnd@arndb.de, gregkh@linuxfoundation.org, jejb@linux.ibm.com, zohar@linux.ibm.com, jmorris@namei.org, serge@hallyn.com, jsnitsel@redhat.com, linux-kernel@vger.kernel.org, daniel.thompson@linaro.org Subject: Re: [Patch v7 0/4] Create and consolidate trusted keys subsystem Message-ID: <20191014193350.GG15552@linux.intel.com> References: <1570425935-7435-1-git-send-email-sumit.garg@linaro.org> <20191011123757.GD3129@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191011123757.GD3129@linux.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 11, 2019 at 03:37:57PM +0300, Jarkko Sakkinen wrote: > On Mon, Oct 07, 2019 at 10:55:31AM +0530, Sumit Garg wrote: > > This patch-set does restructuring of trusted keys code to create and > > consolidate trusted keys subsystem. > > > > Also, patch #2 replaces tpm1_buf code used in security/keys/trusted.c and > > crypto/asymmertic_keys/asym_tpm.c files to use the common tpm_buf code. > > > > Changes in v7: > > 1. Rebased to top of tpmdd/master > > 2. Patch #4: update tpm2 trusted keys code to use tpm_send() instead of > > tpm_transmit_cmd() which is an internal function. > > > > Changes in v6: > > 1. Switch TPM asymmetric code also to use common tpm_buf code. These > > changes required patches #1 and #2 update, so I have dropped review > > tags from those patches. > > 2. Incorporated miscellaneous comments from Jarkko. > > > > Changes in v5: > > 1. Drop 5/5 patch as its more relavant along with TEE patch-set. > > 2. Add Reviewed-by tag for patch #2. > > 3. Fix build failure when "CONFIG_HEADER_TEST" and > > "CONFIG_KERNEL_HEADER_TEST" config options are enabled. > > 4. Misc changes to rename files. > > > > Changes in v4: > > 1. Separate patch for export of tpm_buf code to include/linux/tpm.h > > 2. Change TPM1.x trusted keys code to use common tpm_buf > > 3. Keep module name as trusted.ko only > > > > Changes in v3: > > > > Move TPM2 trusted keys code to trusted keys subsystem. > > > > Changes in v2: > > > > Split trusted keys abstraction patch for ease of review. > > > > Sumit Garg (4): > > tpm: Move tpm_buf code to include/linux/ > > KEYS: Use common tpm_buf for trusted and asymmetric keys > > KEYS: trusted: Create trusted keys subsystem > > KEYS: trusted: Move TPM2 trusted keys code > > > > crypto/asymmetric_keys/asym_tpm.c | 101 +++---- > > drivers/char/tpm/tpm-interface.c | 56 ---- > > drivers/char/tpm/tpm.h | 226 --------------- > > drivers/char/tpm/tpm2-cmd.c | 307 -------------------- > > include/Kbuild | 1 - > > include/keys/{trusted.h => trusted_tpm.h} | 49 +--- > > include/linux/tpm.h | 251 ++++++++++++++-- > > security/keys/Makefile | 2 +- > > security/keys/trusted-keys/Makefile | 8 + > > .../{trusted.c => trusted-keys/trusted_tpm1.c} | 96 +++---- > > security/keys/trusted-keys/trusted_tpm2.c | 314 +++++++++++++++++++++ > > 11 files changed, 652 insertions(+), 759 deletions(-) > > rename include/keys/{trusted.h => trusted_tpm.h} (77%) > > create mode 100644 security/keys/trusted-keys/Makefile > > rename security/keys/{trusted.c => trusted-keys/trusted_tpm1.c} (94%) > > create mode 100644 security/keys/trusted-keys/trusted_tpm2.c > > > > -- > > 2.7.4 > > > > I fixed a merge conflict caused by James' commit. Already pushed. > Compiling test kernel ATM i.e. tested-by's will follow later. Update to my latest master for v8 (otherwise there won't be a clean merge). /Jarkko