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.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS 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 9CB13C32751 for ; Wed, 31 Jul 2019 14:23:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6E60420679 for ; Wed, 31 Jul 2019 14:23:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="b7ckL2eS" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727287AbfGaOXW (ORCPT ); Wed, 31 Jul 2019 10:23:22 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:45507 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727346AbfGaOXW (ORCPT ); Wed, 31 Jul 2019 10:23:22 -0400 Received: by mail-lf1-f67.google.com with SMTP id u10so8833148lfm.12 for ; Wed, 31 Jul 2019 07:23:21 -0700 (PDT) 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=6Mwmelmzw6bH/7dTu0yxXhnmtM+/gvfBNAeELEGk+uk=; b=b7ckL2eSD9hJ7+SslSVgXgqXaYtTrghJzWVqnzRH5arC0as5UaAex1ADlOstZ0ZAgH w5ZSSbXXNcoX8jtKyrctiyVtd6HsBbsFQtSIzZfS28PPueiU1cGACGc9zWiXCdQJ0wpk DuLQOPY6YkD5kUNXs40RHrruT+f6kC9kF/wo6v+T1ORrj4UiuM6wfpvSj2z9NXqnYLZx HgBwJ+wmjHC5w/e9yaL+cigyFxUP3EOJu/ohNtfLocTQL4WpgiRDQdhC4JvAcqraz54h jeVh4ugy80tt9CPL8cyTLUzJDd1ZgLNDIcSfQc8LqwcMzYNldlPqEfbX2KUc9A9DpGGy yiGw== 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=6Mwmelmzw6bH/7dTu0yxXhnmtM+/gvfBNAeELEGk+uk=; b=DlhY3pinotgCX4b1viwI3Gx+VLgDDXMMnwn8O+CM1n1cS67bplO8YImV6ynGbbKzKC r+tv/FCVgM0EgNZ2/CsMjHo1qy6s06ViTIYOxjukVOQQrwTf6RfC+cVMjeUyznbruC14 jMjTLdo8M62PLqWV63oQLpjbVNpQNmg50uFJTs31Wm87TZbqq4QXC2qkAvDkwzKMnVpK 9Xczi7lqqpgHtqpSuFe0N2LOL8BKP9c06FzjigQWNQEeAG2jc1ofKq48Y9fPYdH4wyZd r28tCwDgnBJPO2OnT/JQxKMaLfp0m3SzkLPqM8dXL0smwBqZth1NjzZRlUNE5vbzX+iD pSSg== X-Gm-Message-State: APjAAAXtMsMb9bv4RqxKp5emwDz6pzMXTj2Ggm/qgASMO7ubIt1eyRXO QtXTAN1+QiRuT7eerLchV8ypDvNI8YH2rHQXmzwHKw== X-Google-Smtp-Source: APXvYqzO1Rb1XuGHlY4gc7gehMJjpGhQ7bcBJg5KgrHrj/rbdrN0MlhufGWBshlYJcrDu7aQUEzfCCAGZ0ad3gulmm0= X-Received: by 2002:a19:c7ca:: with SMTP id x193mr3049727lff.151.1564583000498; Wed, 31 Jul 2019 07:23:20 -0700 (PDT) MIME-Version: 1.0 References: <1564489420-677-1-git-send-email-sumit.garg@linaro.org> In-Reply-To: From: Sumit Garg Date: Wed, 31 Jul 2019 19:53:08 +0530 Message-ID: Subject: Re: [RFC v2 0/6] Introduce TEE based Trusted Keys support To: Janne Karhunen Cc: keyrings@vger.kernel.org, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, Jens Wiklander , Jonathan Corbet , dhowells@redhat.com, jejb@linux.ibm.com, Jarkko Sakkinen , Mimi Zohar , James Morris , "Serge E. Hallyn" , Casey Schaufler , Ard Biesheuvel , Daniel Thompson , Linux Doc Mailing List , Linux Kernel Mailing List , linux-arm-kernel , "tee-dev @ lists . linaro . org" Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: On Wed, 31 Jul 2019 at 16:33, Janne Karhunen wrote: > > On Wed, Jul 31, 2019 at 1:26 PM Sumit Garg wrote: > > > > Interesting, I wrote something similar and posted it to the lists a while back: > > > https://github.com/jkrh/linux/commit/d77ea03afedcb5fd42234cd834da8f8a0809f6a6 > > > > > > Since there are no generic 'TEEs' available, > > > > There is already a generic TEE interface driver available in kernel. > > Have a look here: "Documentation/tee.txt". > > I guess my wording was wrong, tried to say that physical TEEs in the > wild vary massively hardware wise. Generalizing these things is rough. > There are already well defined GlobalPlatform Standards to generalize the TEE interface. One of them is GlobalPlatform TEE Client API [1] which provides the basis for this TEE interface. > > > > I implemented the same > > > thing as a generic protocol translator. The shared memory binding for > > > instance already assumes fair amount about the TEE and how that is > > > physically present in the system. Besides, the help from usage of shm > > > is pretty limited due to the size of the keydata. > > > > > > > If you look at patch #1 and #2, they add support to register kernel > > memory buffer (keydata buffer in this case) with TEE to operate on. So > > there isn't any limitation due to the size of the keydata. > > Ah, didn't mean that. Meant that the keydata is typically pretty small > in size, so there is limited benefit from passing that in via shm if > that complicates anything. > Ah, ok. Do you think of any better approach rather than to use SHM? [1] https://globalplatform.org/specs-library/tee-client-api-specification/ -Sumit > > -- > Janne