Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1606054pxb; Thu, 4 Mar 2021 16:09:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJy941MFoysY+CyEmzoJMK8TjTf+1wNqPbBn3C2UIeGHHno/ggVYIz3CMegydHqgF7cqoTGq X-Received: by 2002:a02:3ec7:: with SMTP id s190mr6824756jas.11.1614902961399; Thu, 04 Mar 2021 16:09:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614902961; cv=none; d=google.com; s=arc-20160816; b=OeHPyVbUp4ZTO7g2PFNcTYwZYPOLOjnZNLMlc0E0BEngjtUAmFTeKkOa577DjdZfAA daoNovM4pby1xFuS4sg7ZZXejjkTJCYfy53McjpETS5z23XLc/cp8kaNxHOmBzCm0gs5 MvPTDIAAWYwC36dqU6f2Ptvk1CpBbkT5csfxo2l9T8abFe76TbXe3sVsWswVKIOJqaDr lGVwNhapvzgzNF5lsH9aH2Ttns+6BPJtu1rr76uxUdfMeAyzDuAt4nqAnBV/30cF49ZO vaYaNddJieVZFWUuDCao/Ic801dwWjFNa1K6Ao/kjmnyq/t41tHU0hZSjWc+Cxb/OrWi QbFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=R+fyz1Gmo60Jzev6gG0weSOoqYLjk+pWR3oPV5MKoDA=; b=oekG8J4nOSCmWIYxDz9Y5/qXX/9CDmFOkrH4tfAlr83yZhHgwi4r/IqmGK0BOhQ8Jt JNco9y4gVc56QXsg6dMoopW1aEiGEKxiR85Zc3qLU2eYF3BXtkQYU1Shjd0RBlaoWvVR WjSDPrRmQBgHxMvVWoe2gvlvKpPfVBFXcEXlaClrlaR6V7tTAtQ4b3xGEYaqnk2VRvxU V5cb5Ts1C+n5ecfkzosN7miMW5d0lIf1L+3yUqEdd+lcVRGJ6YM+HGLm1+D65L0M0K5T Tbp4l+BRCGtLrNQGi43ALneRMWdQO2IIr21uUl6ar04y7MWuISJhXYWVqA/rRpRM3b9a X0BQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lCDW9qJO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a18si921195jat.23.2021.03.04.16.09.08; Thu, 04 Mar 2021 16:09:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lCDW9qJO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238113AbhCDKBg (ORCPT + 99 others); Thu, 4 Mar 2021 05:01:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238224AbhCDKBM (ORCPT ); Thu, 4 Mar 2021 05:01:12 -0500 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0E5EC061760 for ; Thu, 4 Mar 2021 02:00:31 -0800 (PST) Received: by mail-lf1-x12a.google.com with SMTP id e7so42231175lft.2 for ; Thu, 04 Mar 2021 02:00:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=R+fyz1Gmo60Jzev6gG0weSOoqYLjk+pWR3oPV5MKoDA=; b=lCDW9qJOuKrhpjESaUjTrpzFc1bcy7QBYhT7TcfsnuwLoRMbe1vBr6ymXsligO+5jG sTneNJj8Lo/s0urIihtY1H8SXSXSMc0VPdePAkij11jLBKd6FP7z75Hhs/Q9YwntF3TE G22+pN90TDJgrRLb6J7+yM0URNfEbiQvrrFK/DTy8p1Br8WUQY/D81lv+oS6NhRELZMp XkyXefNOX+vyFG1WYPbOIOHFaqe+4SYCxjv0b/xioHR1/1QcZEtdOx1Occz4q/dBYc2P 2GGiiDVv7cvyezNdlPriPrhRL76yr8WAKE4nqpuFVw1UnJhcafnu1jt7dyRunIGH6Kvc jmYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=R+fyz1Gmo60Jzev6gG0weSOoqYLjk+pWR3oPV5MKoDA=; b=pkM69Z/Uhfzx8PP5S4wmj89X9L1i1QfKP9roNJsJXUqV6/hdsn5csUfm3NHaln0Cgj QJSjZ4RH9cjLrmAFKOgnEPptFuy9j9N81wFeMEQPZBzrqX9VoSclKTN1oUOXwCJFtrx8 CWFRRKBL6rN8kVUWZvv9z0PYU6FHIzIinvM2e6A86S6HLVrIaKPdJQa1wtihPLi4jL+w K7J97qPtqfUTunYiy9pKtIoAcwGCn6cL3d5hnInY1+3kHHzjTJFal5UgvihkGimfVk3H nCyjM4U52oRKjTtbD9mfuRVpcs5yS6mx1i2P/98qE9enE18FtQnEbPSHIHO2ooduxuSa +WMQ== X-Gm-Message-State: AOAM532GJAO5IXYp/6qD6sbduJYVXyDceGswc0LyNIYsjqWhMwnZxDIS mZYB3k3NKUJZhKBrBHxrzushVsKU83qE15wx1D0PRA== X-Received: by 2002:ac2:4d9b:: with SMTP id g27mr1920444lfe.113.1614852030131; Thu, 04 Mar 2021 02:00:30 -0800 (PST) MIME-Version: 1.0 References: <20210301131127.793707-1-sumit.garg@linaro.org> In-Reply-To: <20210301131127.793707-1-sumit.garg@linaro.org> From: Sumit Garg Date: Thu, 4 Mar 2021 15:30:18 +0530 Message-ID: Subject: Re: [PATCH v9 0/4] Introduce TEE based Trusted Keys support To: Jarkko Sakkinen Cc: Mimi Zohar , James Bottomley , David Howells , Jens Wiklander , Jonathan Corbet , James Morris , "Serge E. Hallyn" , Casey Schaufler , Janne Karhunen , Daniel Thompson , Markus Wamser , Luke Hinds , Elaine Palmer , Ahmad Fatoum , "open list:ASYMMETRIC KEYS" , linux-integrity@vger.kernel.org, "open list:SECURITY SUBSYSTEM" , Linux Doc Mailing List , Linux Kernel Mailing List , linux-arm-kernel , op-tee@lists.trustedfirmware.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jarkko, On Mon, 1 Mar 2021 at 18:41, 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. > > This patch-set has been tested with OP-TEE based early TA which is already > merged in upstream [1]. > > [1] https://github.com/OP-TEE/optee_os/commit/f86ab8e7e0de869dfa25ca05a37ee070d7e5b86b > > Changes in v9: > 1. Rebased to latest tpmdd/master. > 2. Defined pr_fmt() and removed redundant tags. > 3. Patch #2: incorporated misc. comments. > 4. Patch #3: incorporated doc changes from Elaine and misc. comments > from Randy. > 5. Patch #4: reverted to separate maintainer entry as per request from > Jarkko. > 6. Added Jarkko's Tested-by: tag on patch #2. It looks like we don't have any further comments on this patch-set. So would you be able to pick up this patch-set? -Sumit > > Changes in v8: > 1. Added static calls support instead of indirect calls. > 2. Documented trusted keys source module parameter. > 3. Refined patch #1 commit message discription. > 4. Addressed misc. comments on patch #2. > 5. Added myself as Trusted Keys co-maintainer instead. > 6. Rebased to latest tpmdd master. > > Changes in v7: > 1. Added a trusted.source module parameter in order to enforce user's > choice in case a particular platform posses both TPM and TEE. > 2. Refine commit description for patch #1. > > Changes in v6: > 1. Revert back to dynamic detection of trust source. > 2. Drop author mention from trusted_core.c and trusted_tpm1.c files. > 3. Rebased to latest tpmdd/master. > > Changes in v5: > 1. Drop dynamic detection of trust source and use compile time flags > instead. > 2. Rename trusted_common.c -> trusted_core.c. > 3. Rename callback: cleanup() -> exit(). > 4. Drop "tk" acronym. > 5. Other misc. comments. > 6. Added review tags for patch #3 and #4. > > Changes in v4: > 1. Pushed independent TEE features separately: > - Part of recent TEE PR: https://lkml.org/lkml/2020/5/4/1062 > 2. Updated trusted-encrypted doc with TEE as a new trust source. > 3. Rebased onto latest tpmdd/master. > > Changes in v3: > 1. Update patch #2 to support registration of multiple kernel pages. > 2. Incoporate dependency patch #4 in this patch-set: > https://patchwork.kernel.org/patch/11091435/ > > Changes in v2: > 1. Add reviewed-by tags for patch #1 and #2. > 2. Incorporate comments from Jens for patch #3. > 3. Switch to use generic trusted keys framework. > > Sumit Garg (4): > KEYS: trusted: Add generic trusted keys framework > KEYS: trusted: Introduce TEE based Trusted Keys > doc: trusted-encrypted: updates with TEE as a new trust source > MAINTAINERS: Add entry for TEE based Trusted Keys > > .../admin-guide/kernel-parameters.txt | 12 + > .../security/keys/trusted-encrypted.rst | 171 ++++++-- > MAINTAINERS | 8 + > include/keys/trusted-type.h | 53 +++ > include/keys/trusted_tee.h | 16 + > include/keys/trusted_tpm.h | 29 +- > security/keys/trusted-keys/Makefile | 2 + > security/keys/trusted-keys/trusted_core.c | 358 +++++++++++++++++ > security/keys/trusted-keys/trusted_tee.c | 317 +++++++++++++++ > security/keys/trusted-keys/trusted_tpm1.c | 366 ++++-------------- > 10 files changed, 981 insertions(+), 351 deletions(-) > create mode 100644 include/keys/trusted_tee.h > create mode 100644 security/keys/trusted-keys/trusted_core.c > create mode 100644 security/keys/trusted-keys/trusted_tee.c > > -- > 2.25.1 >