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=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=no 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 17DD2C433E0 for ; Tue, 2 Jun 2020 14:44:43 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D63182068D for ; Tue, 2 Jun 2020 14:44:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="WaxpasF9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D63182068D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Mime-Version:References: In-Reply-To:Date:To:From:Subject:Message-ID:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Hu+JAtW+p7YYcAwwkNdc7lnEAdfVQMl+DG+N3jhPD30=; b=WaxpasF9liGW7I P59IAyOkv+xqMV3txiSOhACrC3nyJkYDIqFQ43Vv8PI3OZk6NrlevN6H8g/4EsMtSVGqa+/N3cJFg heHFXnJkJVA52yq5S//6xp6A2rXkTBZ7/eiuXfuDk0J4cL+GdrP+4onb56Mw05fWiQzxkPRqojRxX 7W3Nxtb7lx579uoCe4ax7QSgJUpR1xW+v1Bk209IHmU5OOq6qkqlS2LMAgSJ1UUZIxPug+gejoqLh m0Zj4IF3b5gJnFoDNMU3ohFtcsEwskirugldY9QEnNfq37HJCiiCxF+d/y2kM65hPByMn2jqk0/tX dtbz9TnN7wrAd4969KJg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jg89i-0004V0-K0; Tue, 02 Jun 2020 14:44:42 +0000 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5] helo=mx0a-001b2d01.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jg89f-0004Tq-Tn for linux-arm-kernel@lists.infradead.org; Tue, 02 Jun 2020 14:44:41 +0000 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 052EWRur014054; Tue, 2 Jun 2020 10:44:10 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 31dq2jbw81-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 02 Jun 2020 10:44:10 -0400 Received: from m0098421.ppops.net (m0098421.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 052EWj6U015700; Tue, 2 Jun 2020 10:44:09 -0400 Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0a-001b2d01.pphosted.com with ESMTP id 31dq2jbw73-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 02 Jun 2020 10:44:09 -0400 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 052EehHc010574; Tue, 2 Jun 2020 14:44:07 GMT Received: from b03cxnp07028.gho.boulder.ibm.com (b03cxnp07028.gho.boulder.ibm.com [9.17.130.15]) by ppma04dal.us.ibm.com with ESMTP id 31bf4a15bw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 02 Jun 2020 14:44:07 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 052Eh6LO48300354 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 2 Jun 2020 14:43:06 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 532DB7805E; Tue, 2 Jun 2020 14:43:06 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 30AEC78064; Tue, 2 Jun 2020 14:43:03 +0000 (GMT) Received: from [153.66.254.194] (unknown [9.85.147.245]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 2 Jun 2020 14:43:02 +0000 (GMT) Message-ID: <1591108981.4253.17.camel@linux.ibm.com> Subject: Re: [PATCH v5 0/4] Introduce TEE based Trusted Keys support From: James Bottomley To: Sumit Garg , jarkko.sakkinen@linux.intel.com, zohar@linux.ibm.com Date: Tue, 02 Jun 2020 07:43:01 -0700 In-Reply-To: <1591107505-6030-1-git-send-email-sumit.garg@linaro.org> References: <1591107505-6030-1-git-send-email-sumit.garg@linaro.org> X-Mailer: Evolution 3.26.6 Mime-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.687 definitions=2020-06-02_13:2020-06-02, 2020-06-02 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 bulkscore=0 mlxlogscore=999 spamscore=0 clxscore=1011 impostorscore=0 suspectscore=0 priorityscore=1501 adultscore=0 cotscore=-2147483648 lowpriorityscore=0 phishscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006020104 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200602_074440_076379_1B3CB289 X-CRM114-Status: GOOD ( 16.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: jejb@linux.ibm.com Cc: tee-dev@lists.linaro.org, daniel.thompson@linaro.org, op-tee@lists.trustedfirmware.org, corbet@lwn.net, janne.karhunen@gmail.com, linux-doc@vger.kernel.org, jmorris@namei.org, linux-kernel@vger.kernel.org, dhowells@redhat.com, linux-security-module@vger.kernel.org, keyrings@vger.kernel.org, Markus.Wamser@mixed-mode.de, casey@schaufler-ca.com, linux-integrity@vger.kernel.org, jens.wiklander@linaro.org, linux-arm-kernel@lists.infradead.org, serge@hallyn.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, 2020-06-02 at 19:48 +0530, Sumit Garg wrote: > Add support for TEE based trusted keys where TEE provides the > functionality to seal and unseal trusted keys using hardware unique > key. Also, this is an alternative in case platform doesn't possess a > TPM device. So here's a meta problem: in the case when the platform possesses both TEE and TPM what should it do? Things like this: > --- a/security/keys/trusted-keys/trusted_core.c > +++ b/security/keys/trusted-keys/trusted_core.c > @@ -25,6 +25,8 @@ > > #if defined(CONFIG_TRUSTED_TPM) > static struct trusted_key_ops *trusted_key_ops = > &tpm_trusted_key_ops; > +#elif defined(CONFIG_TRUSTED_TEE) > +static struct trusted_key_ops *trusted_key_ops = > &tee_trusted_key_ops; > #else Say it's either/or at a Kconfig level: so if you select both TEE and TPM based trusted keys at compile time, we intall the TPM ops and ignore the TEE ops, is that right? Surely this should be runtime selectable based on what the platform has ... perhaps it should even be selectable per key? Once it is runtime selectable, what should be selected in the both case? Or should we allow the user to decide, if so, how? when you pipe a trusted key, I think the subtype (TEE or TPM) should be part of the piped information, so it loads again seamlessly. This would actually be fixed by something like the ASN.1 scheme I'm trying to upstream, at least for TPM keys, but do TEE keys have a recognized ASN.1 format? James _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel