Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2244398ybl; Thu, 15 Aug 2019 08:44:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqxLkdL3eXFTDO9EcgwSNrQYomL0HODn1SzjmWCdwwZ8DL1HmT5YSVTJ8MSQtcinNh3KApKN X-Received: by 2002:aa7:8f2e:: with SMTP id y14mr6080730pfr.113.1565883848393; Thu, 15 Aug 2019 08:44:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565883848; cv=none; d=google.com; s=arc-20160816; b=wm7MMA7Y4fxgTELKoaiBseZR26NMrPd3nOCs22x4kQo9qcl2OY9rTVqHjFQXAW9XOF qmBB3X9BtNhEAI9Oy29dGO0nWGden98Zd2ps3kZqJiZs7c//QqH7DGiP0dYXz+TKW1ii +/Ccot8ycJpI+bg3D7rk3hTMBEOvCMChgHcsfbhCrBpww5vjyQ1B19ZxI4s8nw2aD0BU xa+Muomx1U3UG2Kum7uSZdDnLm6X4OWrdAKzjX5jfGBk9wowOYgdnsaoOjruc0HzrYZV BwtQPIdFLcG3pO8EbLiNedxeciV1z0FAm0tP/L5s0tktSNYbOd36fesf2MJbo/lyFn3s vn9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=mUruGyQ7idnVcnDjcfh2a9B474Zd+VwWcvc8FkAz2sA=; b=wo2mmOuheUrv2sJ/N6k5WyGOpa2HuBXKVbM9wHmSQTRYQ8G7V3CljZBYcPDk3Dr+AM Nq22kJg+dxWwIXQwX89Qw2hEnsOLoe0H65BDE0OVrU/K3C9QHJJ+FjT3Z0NIGEs9nsQm 7JZK130fg1Eg8LNELSjQCFZWQOQZb71FPHyKW6eS/Onb4PzBtj31+Ek6yWYanRopjUl6 sEJp9JR/nEYDVCJPhFl1M4mnYS2IeaI2sqVIwUhrQWrGDWTFSsnoJOL8QfYcE8zS0hBx JLG0frqc1CBa+Slym0inS6k9pFXthzCkCCNDqDqzmDAruXuenGMRYvuNxVXOmOuvyyx6 XHgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=V+dTycUT; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t16si2368717pfq.88.2019.08.15.08.43.47; Thu, 15 Aug 2019 08:44:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=V+dTycUT; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732374AbfHOPGy (ORCPT + 99 others); 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