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=-20.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=unavailable 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 C1C1EC433E0 for ; Fri, 15 Jan 2021 06:03:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7D07223A40 for ; Fri, 15 Jan 2021 06:03:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726680AbhAOGD2 (ORCPT ); Fri, 15 Jan 2021 01:03:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726455AbhAOGD1 (ORCPT ); Fri, 15 Jan 2021 01:03:27 -0500 Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55990C0613D3 for ; Thu, 14 Jan 2021 22:02:46 -0800 (PST) Received: by mail-lj1-x22f.google.com with SMTP id n8so337609ljg.3 for ; Thu, 14 Jan 2021 22:02:46 -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=MDmlV62xy2dTAa7jUaW4qdfTp5nhVCOQRSmVDFfq7CU=; b=P3f/TC0N21PLslxgUMkEFSMq6IEjaNybcJJZ9sGTGnSYNOG2usJJTVflhsSmi4hqHR KN06JeUoyNa7d3JQCTiClZLNTEcyDizNR63bHhj/nr66vJLqBVq0wsG6z/M0+ht2q9QW aGskVR2SNoz2AmO8Ad2lStOC76v9OnGDq/QyQ+wISQgNLdZx7kcJkH+Uz2V+JXLJ78mW BXRHu0W6VcWo1rVP/TqK9xCMkJE3QIgdaDSJqdhEcf7YqGQkxJ7SH9gRjTFEy9FslFfb /4ZCr3zhKywmBqS6j721detK5gmAfBUoyFS5OZt72xdBTeJ81NKxZ0c6BjI9gc+8hXCC 1/QQ== 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=MDmlV62xy2dTAa7jUaW4qdfTp5nhVCOQRSmVDFfq7CU=; b=jJwozpqdFi6/khgPDx/4BdKUCC47h8rHhZRrWtBaQ236NzCdV/o0jDI97j/ABVVqdo G9VCGiTCKhDV7hMNbGojVbCJ9o2qa0a71oo3XqYdFG2CJEYsUQeFnCJMTCylLDS2rcfC 0xqYgXbFFzLwT9RZHUZqKjdhZHgaxSijbDkZsvrMieYLy/Xji1r6y1ebZIv5mCgEDS3X C4GjSRRg6eIz2D6wMbkOQI6A1NDdpV8KbgyrLOiwP9i6TPnVyYR5TCYFoWmIbPVWlqfr YqkbxI2j0Cah8rlm33sluCOm1zIJib+KP0EB05ALZLGaEMXqFgnsTffI69fFKxbZ/0el UJZA== X-Gm-Message-State: AOAM532PBydTH5bfzSf6q+IJdWZsGNuNxqhqpPSV2Dg+9P3g/twc5zz3 77UJVNCQKA7L0awPM4+V+WvjpJVcITGhNxFGvib9XQ== X-Google-Smtp-Source: ABdhPJx95UKtrbv3RMWAwaHdwARhnz6c9CWvdsRsZhfDyk0HF1CL0Rx8irqQzcSP9Qi0gnaJ8BTByLuHRW09qLnJd7M= X-Received: by 2002:a2e:2242:: with SMTP id i63mr4467220lji.343.1610690563696; Thu, 14 Jan 2021 22:02:43 -0800 (PST) MIME-Version: 1.0 References: <1604419306-26105-1-git-send-email-sumit.garg@linaro.org> <1604419306-26105-3-git-send-email-sumit.garg@linaro.org> In-Reply-To: From: Sumit Garg Date: Fri, 15 Jan 2021 11:32:31 +0530 Message-ID: Subject: Re: [PATCH v8 2/4] KEYS: trusted: Introduce TEE based Trusted Keys To: Jarkko Sakkinen Cc: Jarkko Sakkinen , 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 , "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: keyrings@vger.kernel.org On Thu, 14 Jan 2021 at 07:35, Jarkko Sakkinen wrote: > > On Wed, Jan 13, 2021 at 04:47:00PM +0530, Sumit Garg wrote: > > Hi Jarkko, > > > > On Mon, 11 Jan 2021 at 22:05, Jarkko Sakkinen wrote: > > > > > > On Tue, Nov 03, 2020 at 09:31:44PM +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. > > > > > > > > Refer to Documentation/tee.txt for detailed information about TEE. > > > > > > > > Signed-off-by: Sumit Garg > > > > > > I haven't yet got QEMU environment working with aarch64, this produces > > > just a blank screen: > > > > > > ./output/host/usr/bin/qemu-system-aarch64 -M virt -cpu cortex-a53 -smp 1 -kernel output/images/Image -initrd output/images/rootfs.cpio -serial stdio > > > > > > My BuildRoot fork for TPM and keyring testing is located over here: > > > > > > https://git.kernel.org/pub/scm/linux/kernel/git/jarkko/buildroot-tpmdd.git/ > > > > > > The "ARM version" is at this point in aarch64 branch. Over time I will > > > define tpmdd-x86_64 and tpmdd-aarch64 boards and everything will be then > > > in the master branch. > > > > > > To create identical images you just need to > > > > > > $ make tpmdd_defconfig && make > > > > > > Can you check if you see anything obviously wrong? I'm eager to test this > > > patch set, and in bigger picture I really need to have ready to run > > > aarch64 environment available. > > > > I would rather suggest you to follow steps listed here [1] as to test > > this feature on Qemu aarch64 we need to build firmwares such as TF-A, > > OP-TEE, UEFI etc. which are all integrated into OP-TEE Qemu build > > system [2]. And then it would be easier to migrate them to your > > buildroot environment as well. > > > > [1] https://lists.trustedfirmware.org/pipermail/op-tee/2020-May/000027.html > > [2] https://optee.readthedocs.io/en/latest/building/devices/qemu.html#qemu-v8 > > > > -Sumit > > Can you provide 'keyctl_change'? Otherwise, the steps are easy to follow. > $ cat keyctl_change diff --git a/common.mk b/common.mk index aeb7b41..663e528 100644 --- a/common.mk +++ b/common.mk @@ -229,6 +229,7 @@ BR2_PACKAGE_OPTEE_TEST_SDK ?= $(OPTEE_OS_TA_DEV_KIT_DIR) BR2_PACKAGE_OPTEE_TEST_SITE ?= $(OPTEE_TEST_PATH) BR2_PACKAGE_STRACE ?= y BR2_TARGET_GENERIC_GETTY_PORT ?= $(if $(CFG_NW_CONSOLE_UART),ttyAMA$(CFG_NW_CONSOLE_UART),ttyAMA0) +BR2_PACKAGE_KEYUTILS := y # All BR2_* variables from the makefile or the environment are appended to # ../out-br/extra.conf. All values are quoted "..." except y and n. diff --git a/kconfigs/qemu.conf b/kconfigs/qemu.conf index 368c18a..832ab74 100644 --- a/kconfigs/qemu.conf +++ b/kconfigs/qemu.conf @@ -20,3 +20,5 @@ CONFIG_9P_FS=y CONFIG_9P_FS_POSIX_ACL=y CONFIG_HW_RANDOM=y CONFIG_HW_RANDOM_VIRTIO=y +CONFIG_TRUSTED_KEYS=y +CONFIG_ENCRYPTED_KEYS=y > After I've successfully tested 2/4, I'd suggest that you roll out one more > version and CC the documentation patch to Elaine and Mini, and clearly > remark in the commit message that TEE is a standard, with a link to the > specification. > Sure, I will roll out the next version after your testing. -Sumit > /Jarkko 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=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=unavailable 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 5A9A6C433E0 for ; Fri, 15 Jan 2021 06:04:26 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 0F06A205F4 for ; Fri, 15 Jan 2021 06:04:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0F06A205F4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=J3EgN8nhyBXBZWcdDHwItn65GbqGnZtLhU5Zl3hN5mQ=; b=gSrBnvC/9TSjhi2xdWLSFeeRP Jdvv6E7T2BwJw4gnJuQjQWIxxptbae3wRbFgOlj3ISIl/c/ex7oFiRced+lS2JYniT+OgsLwXkf+D srIkMiOVcigFDL9OqU/03SE/ZXTVCybs0YKnQ3kaq0KAhv1m6GqREbpL6FC+zEfXru4TcFLBTxoJ6 QFvBbsYcqTtJM31kVE3VDLrdum1Pu1egmeFjNOvj/6YQGFAyDbkMQ9IEKoZsS6ZDW5K+IQ6x0YdfW IL0NpRklQvIPiEWhA2O5QOiK5VdDLhhmB/raL15qFZL9MLtOnuQiG/bAYBBdHu0mxloSE/tneY6Ou FgcBQOYqg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l0ICA-0004Wf-Pq; Fri, 15 Jan 2021 06:02:50 +0000 Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l0IC7-0004WJ-8p for linux-arm-kernel@lists.infradead.org; Fri, 15 Jan 2021 06:02:48 +0000 Received: by mail-lj1-x234.google.com with SMTP id e7so9130813ljg.10 for ; Thu, 14 Jan 2021 22:02:44 -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=MDmlV62xy2dTAa7jUaW4qdfTp5nhVCOQRSmVDFfq7CU=; b=P3f/TC0N21PLslxgUMkEFSMq6IEjaNybcJJZ9sGTGnSYNOG2usJJTVflhsSmi4hqHR KN06JeUoyNa7d3JQCTiClZLNTEcyDizNR63bHhj/nr66vJLqBVq0wsG6z/M0+ht2q9QW aGskVR2SNoz2AmO8Ad2lStOC76v9OnGDq/QyQ+wISQgNLdZx7kcJkH+Uz2V+JXLJ78mW BXRHu0W6VcWo1rVP/TqK9xCMkJE3QIgdaDSJqdhEcf7YqGQkxJ7SH9gRjTFEy9FslFfb /4ZCr3zhKywmBqS6j721detK5gmAfBUoyFS5OZt72xdBTeJ81NKxZ0c6BjI9gc+8hXCC 1/QQ== 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=MDmlV62xy2dTAa7jUaW4qdfTp5nhVCOQRSmVDFfq7CU=; b=AxUWB49WUxct5WnxpC+DoITfFt+XMnhWHQyqcEadeVwb9W71t7MKq5qtwRYX70aYdJ v52Pf6UX6NJimWJZ2olcrVYdY8Yx2PMnTxi47VclodKAEqLxvPEeVI0vAarcSIcdXpWC Kr5H6fI1w3JuvTML9RFNqFE9vLfR3Uj8Zq8ZZQw6n3/Z+TRRBsg9SEZzJYLpBYLr8MAG A2v85lovrLA//iNwWcjZOyZhcGSA4U7T7XF/FkAklx2iw3JkpaS9iyEqcKtF3IUaSnvc zvQ9pSKoxUHHJYJkpcLHbib1Qy5+eIp/CiBPsUHnbSQ2s9TUovTWrPRDVqbo/hLrvuBN KnWg== X-Gm-Message-State: AOAM532h7DwyXTFc1+XFGUqSZ4tLPcI30VBmce/i/2UmwLZ6LUMpBpMt eq3q3p9R2M75yLJBBruWPfJmK+/OIWqRe8IJHKqnuQ== X-Google-Smtp-Source: ABdhPJx95UKtrbv3RMWAwaHdwARhnz6c9CWvdsRsZhfDyk0HF1CL0Rx8irqQzcSP9Qi0gnaJ8BTByLuHRW09qLnJd7M= X-Received: by 2002:a2e:2242:: with SMTP id i63mr4467220lji.343.1610690563696; Thu, 14 Jan 2021 22:02:43 -0800 (PST) MIME-Version: 1.0 References: <1604419306-26105-1-git-send-email-sumit.garg@linaro.org> <1604419306-26105-3-git-send-email-sumit.garg@linaro.org> In-Reply-To: From: Sumit Garg Date: Fri, 15 Jan 2021 11:32:31 +0530 Message-ID: Subject: Re: [PATCH v8 2/4] KEYS: trusted: Introduce TEE based Trusted Keys To: Jarkko Sakkinen X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210115_010247_624277_FD25EB33 X-CRM114-Status: GOOD ( 27.23 ) 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: , Cc: "open list:SECURITY SUBSYSTEM" , Daniel Thompson , op-tee@lists.trustedfirmware.org, Jonathan Corbet , James Bottomley , Janne Karhunen , Linux Doc Mailing List , James Morris , Mimi Zohar , Linux Kernel Mailing List , David Howells , Luke Hinds , "open list:ASYMMETRIC KEYS" , Jarkko Sakkinen , Markus Wamser , Casey Schaufler , linux-integrity@vger.kernel.org, Jens Wiklander , linux-arm-kernel , "Serge E. Hallyn" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, 14 Jan 2021 at 07:35, Jarkko Sakkinen wrote: > > On Wed, Jan 13, 2021 at 04:47:00PM +0530, Sumit Garg wrote: > > Hi Jarkko, > > > > On Mon, 11 Jan 2021 at 22:05, Jarkko Sakkinen wrote: > > > > > > On Tue, Nov 03, 2020 at 09:31:44PM +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. > > > > > > > > Refer to Documentation/tee.txt for detailed information about TEE. > > > > > > > > Signed-off-by: Sumit Garg > > > > > > I haven't yet got QEMU environment working with aarch64, this produces > > > just a blank screen: > > > > > > ./output/host/usr/bin/qemu-system-aarch64 -M virt -cpu cortex-a53 -smp 1 -kernel output/images/Image -initrd output/images/rootfs.cpio -serial stdio > > > > > > My BuildRoot fork for TPM and keyring testing is located over here: > > > > > > https://git.kernel.org/pub/scm/linux/kernel/git/jarkko/buildroot-tpmdd.git/ > > > > > > The "ARM version" is at this point in aarch64 branch. Over time I will > > > define tpmdd-x86_64 and tpmdd-aarch64 boards and everything will be then > > > in the master branch. > > > > > > To create identical images you just need to > > > > > > $ make tpmdd_defconfig && make > > > > > > Can you check if you see anything obviously wrong? I'm eager to test this > > > patch set, and in bigger picture I really need to have ready to run > > > aarch64 environment available. > > > > I would rather suggest you to follow steps listed here [1] as to test > > this feature on Qemu aarch64 we need to build firmwares such as TF-A, > > OP-TEE, UEFI etc. which are all integrated into OP-TEE Qemu build > > system [2]. And then it would be easier to migrate them to your > > buildroot environment as well. > > > > [1] https://lists.trustedfirmware.org/pipermail/op-tee/2020-May/000027.html > > [2] https://optee.readthedocs.io/en/latest/building/devices/qemu.html#qemu-v8 > > > > -Sumit > > Can you provide 'keyctl_change'? Otherwise, the steps are easy to follow. > $ cat keyctl_change diff --git a/common.mk b/common.mk index aeb7b41..663e528 100644 --- a/common.mk +++ b/common.mk @@ -229,6 +229,7 @@ BR2_PACKAGE_OPTEE_TEST_SDK ?= $(OPTEE_OS_TA_DEV_KIT_DIR) BR2_PACKAGE_OPTEE_TEST_SITE ?= $(OPTEE_TEST_PATH) BR2_PACKAGE_STRACE ?= y BR2_TARGET_GENERIC_GETTY_PORT ?= $(if $(CFG_NW_CONSOLE_UART),ttyAMA$(CFG_NW_CONSOLE_UART),ttyAMA0) +BR2_PACKAGE_KEYUTILS := y # All BR2_* variables from the makefile or the environment are appended to # ../out-br/extra.conf. All values are quoted "..." except y and n. diff --git a/kconfigs/qemu.conf b/kconfigs/qemu.conf index 368c18a..832ab74 100644 --- a/kconfigs/qemu.conf +++ b/kconfigs/qemu.conf @@ -20,3 +20,5 @@ CONFIG_9P_FS=y CONFIG_9P_FS_POSIX_ACL=y CONFIG_HW_RANDOM=y CONFIG_HW_RANDOM_VIRTIO=y +CONFIG_TRUSTED_KEYS=y +CONFIG_ENCRYPTED_KEYS=y > After I've successfully tested 2/4, I'd suggest that you roll out one more > version and CC the documentation patch to Elaine and Mini, and clearly > remark in the commit message that TEE is a standard, with a link to the > specification. > Sure, I will roll out the next version after your testing. -Sumit > /Jarkko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel