From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A175C3A589 for ; Thu, 15 Aug 2019 15:06:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3C2212086C for ; Thu, 15 Aug 2019 15:06:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565881615; bh=h87oyHb/jDVyBLnySLgKHX4dvlaW3Dq+FlV+2DQZ09w=; h=Subject:From:To:Cc:Date:In-Reply-To:References:List-ID:From; b=d5ZezH9+Fc/Qwvrl0bp/UYJKFrz9ia0C3KpX77replj/fLXT3PphfQ1lhTRWIoPYS IMyBFJlYcxJfSObigDEU7t2C2Loz5Z3xoKj0WWLR7w+cOqxchmGzf6lPro+ViuDzHm 95AvZzzJ42A9xx1Cj4FPZ5fpbdiSm6a8B01KRdS8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732374AbfHOPGy (ORCPT ); Thu, 15 Aug 2019 11:06:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:51068 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726120AbfHOPGy (ORCPT ); Thu, 15 Aug 2019 11:06:54 -0400 Received: from localhost.localdomain (ool-18bba523.dyn.optonline.net [24.187.165.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C71D12084D; Thu, 15 Aug 2019 15:06:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565881612; bh=h87oyHb/jDVyBLnySLgKHX4dvlaW3Dq+FlV+2DQZ09w=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=V+dTycUTuRDgALjRVZkxEq9eu2k8qOyjjDRNH92NGSH3VtAHne5cSeWxUl+ec9K9R FrLzSHgQQY/tgqFto8gZ9nYLZ8NSiZir+RRe7GbB3v6Qp06QkLZvUOmkQ5q/KCf8vR tMlXKRCP7uBRl24Wb+xLk7N/MCEfa3iU+XxgblqM= Message-ID: <1565881609.9424.7.camel@kernel.org> Subject: Re: [RFC/RFT v4 0/5] Add generic trusted keys framework/subsystem From: Mimi Zohar To: Sumit Garg Cc: keyrings@vger.kernel.org, linux-integrity@vger.kernel.org, "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , linux-security-module@vger.kernel.org, dhowells@redhat.com, Herbert Xu , davem@davemloft.net, peterhuewe@gmx.de, jgg@ziepe.ca, jejb@linux.ibm.com, Jarkko Sakkinen , Arnd Bergmann , Greg Kroah-Hartman , James Morris , "Serge E. Hallyn" , Casey Schaufler , Ard Biesheuvel , Daniel Thompson , Linux Kernel Mailing List , "tee-dev @ lists . linaro . org" Date: Thu, 15 Aug 2019 11:06:49 -0400 In-Reply-To: References: <1565682784-10234-1-git-send-email-sumit.garg@linaro.org> <1565789078.10490.10.camel@kernel.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.5 (3.20.5-1.fc24) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, 2019-08-15 at 18:33 +0530, Sumit Garg wrote: > Hi Mimi, > > On Wed, 14 Aug 2019 at 18:54, Mimi Zohar wrote: > > > > Hi Sumit, > > > > On Tue, 2019-08-13 at 13:22 +0530, Sumit Garg wrote: > > > This patch-set is an outcome of discussion here [1]. It has evolved very > > > much since v1 to create, consolidate and generalize trusted keys > > > subsystem. > > > > > > This framework has been tested with trusted keys support provided via TEE > > > but I wasn't able to test it with a TPM device as I don't possess one. It > > > would be really helpful if others could test this patch-set using a TPM > > > device. > > > > With the "CONFIG_HEADER_TEST" and "CONFIG_KERNEL_HEADER_TEST" config > > options enabled, which is required for linux-next, it fails to build. > > > > TBH, I wasn't aware about this test feature for headers. It's new to me too. > It looks like > the header which fails this test is "include/keys/trusted_tpm.h" which > is basically a rename of "include/keys/trusted.h" plus changes in this > patch-set. > > And "include/keys/trusted.h" header is already put under blacklist > here: "include/Kbuild +68" as it fails to build. So its that rename > due to which build failure is observed now. > > It seems to be an easy fix for this build failure via following changes: > > diff --git a/include/keys/trusted_tpm.h b/include/keys/trusted_tpm.h > index 7b593447920b..ca1bec0ef65d 100644 > --- a/include/keys/trusted_tpm.h > +++ b/include/keys/trusted_tpm.h > @@ -2,6 +2,9 @@ > #ifndef __TRUSTED_TPM_H > #define __TRUSTED_TPM_H > > +#include > +#include > + > /* implementation specific TPM constants */ > #define MAX_BUF_SIZE 1024 > #define TPM_GETRANDOM_SIZE 14 > > So I will include above changes in this patch-set and also remove > "include/keys/trusted.h" header from the blacklist. That works, thanks.  With this patch set, at least the EVM trusted key is properly being decrypted by the encrypted key with both a TPM 1.2 and PTT TPM 2.0.  My laptop still boots properly.  Over the weekend I'll try to actually review the patches. Mimi