From patchwork Fri Jul 3 15:36:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarkko Sakkinen X-Patchwork-Id: 6716261 Return-Path: X-Original-To: patchwork-tpmdd-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 724BF9F1C1 for ; Fri, 3 Jul 2015 15:37:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 95190207F2 for ; Fri, 3 Jul 2015 15:37:10 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 84FFA207EC for ; Fri, 3 Jul 2015 15:37:09 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=sfs-ml-1.v29.ch3.sourceforge.com) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1ZB31W-0000cB-Rr; Fri, 03 Jul 2015 15:37:06 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1ZB31W-0000bz-1L for tpmdd-devel@lists.sourceforge.net; Fri, 03 Jul 2015 15:37:06 +0000 X-ACL-Warn: Received: from mga09.intel.com ([134.134.136.24]) by sog-mx-4.v43.ch3.sourceforge.com with esmtp (Exim 4.76) id 1ZB31V-0005W0-69 for tpmdd-devel@lists.sourceforge.net; Fri, 03 Jul 2015 15:37:06 +0000 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP; 03 Jul 2015 08:37:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,400,1432623600"; d="scan'208";a="755547320" Received: from scheller-mobl1.ger.corp.intel.com (HELO localhost) ([10.252.20.4]) by fmsmga002.fm.intel.com with ESMTP; 03 Jul 2015 08:36:54 -0700 From: Jarkko Sakkinen To: peterhuewe@gmx.de, tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, safford@us.ibm.com Date: Fri, 3 Jul 2015 18:36:34 +0300 Message-Id: <1435937799-28040-3-git-send-email-jarkko.sakkinen@linux.intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1435937799-28040-1-git-send-email-jarkko.sakkinen@linux.intel.com> References: <1435937799-28040-1-git-send-email-jarkko.sakkinen@linux.intel.com> X-Spam-Score: -0.6 (/) X-Headers-End: 1ZB31V-0005W0-69 Cc: "open list:KEYS-TRUSTED" , David Howells , "open list:KEYS-TRUSTED" , James Morris , "Serge E. Hallyn" Subject: [tpmdd-devel] [PATCH 2/4] trusted: move struct trusted_key_options to trusted-type.h X-BeenThere: tpmdd-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Tpm Device Driver maintainance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: tpmdd-devel-bounces@lists.sourceforge.net X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, HK_RANDOM_ENVFROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Moved struct trusted_key_options to trustes-type.h so that the fields can be accessed from drivers/char/tpm. Signed-off-by: Jarkko Sakkinen --- include/keys/trusted-type.h | 13 +++++++++++++ security/keys/trusted.h | 11 ----------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/include/keys/trusted-type.h b/include/keys/trusted-type.h index 56f82e5..9a2c626 100644 --- a/include/keys/trusted-type.h +++ b/include/keys/trusted-type.h @@ -12,10 +12,12 @@ #include #include +#include #define MIN_KEY_SIZE 32 #define MAX_KEY_SIZE 128 #define MAX_BLOB_SIZE 320 +#define MAX_PCRINFO_SIZE 64 struct trusted_key_payload { struct rcu_head rcu; @@ -26,6 +28,17 @@ struct trusted_key_payload { unsigned char blob[MAX_BLOB_SIZE]; }; +struct trusted_key_options { + uint16_t keytype; + uint32_t keyhandle; + unsigned char keyauth[TPM_DIGEST_SIZE]; + unsigned char blobauth[TPM_DIGEST_SIZE]; + uint32_t pcrinfo_len; + unsigned char pcrinfo[MAX_PCRINFO_SIZE]; + int pcrlock; +}; + + extern struct key_type key_type_trusted; #endif /* _KEYS_TRUSTED_TYPE_H */ diff --git a/security/keys/trusted.h b/security/keys/trusted.h index 3249fbd..ff001a5 100644 --- a/security/keys/trusted.h +++ b/security/keys/trusted.h @@ -2,7 +2,6 @@ #define __TRUSTED_KEY_H /* implementation specific TPM constants */ -#define MAX_PCRINFO_SIZE 64 #define MAX_BUF_SIZE 512 #define TPM_GETRANDOM_SIZE 14 #define TPM_OSAP_SIZE 36 @@ -36,16 +35,6 @@ enum { SRK_keytype = 4 }; -struct trusted_key_options { - uint16_t keytype; - uint32_t keyhandle; - unsigned char keyauth[SHA1_DIGEST_SIZE]; - unsigned char blobauth[SHA1_DIGEST_SIZE]; - uint32_t pcrinfo_len; - unsigned char pcrinfo[MAX_PCRINFO_SIZE]; - int pcrlock; -}; - #define TPM_DEBUG 0 #if TPM_DEBUG