Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp135511pxb; Thu, 14 Jan 2021 22:04:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJzDI7VhTMIfyL7Ar5fLFSfxahoixelg5WzGlWQ1gmnEJbbhp1xouVJQXHoZIi8abIv7MR5Z X-Received: by 2002:a17:906:c349:: with SMTP id ci9mr6457492ejb.198.1610690667655; Thu, 14 Jan 2021 22:04:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610690667; cv=none; d=google.com; s=arc-20160816; b=qkAEtNw/BcwsKWfBOFY3PQcb7Yrs9SiyzRYTVjTQFOMzNlG6FEvLMFpNI8Da9eNXBe xV5CGuMMGQaNm1+VCxaQyyjnnZDuA3cH5V3JcbCppkDj37JbwEPfYkaeeiiFvlLBOLx1 UBKcczP0WoWTx7f39vtsITrkDu3bf/OWRiq+7/BI0nrrxv3s2EXBc3F6+jVMxoeI24Np oxWehN+BEcNjBEZ1c7BesPBmFFYRR1tEj/6IJnGwpU2xCc/Gll9Y5lF8pdh0e1u0G4j5 J0AhfH6X/h/fuuLwCrfanx13NSKpqS+vlOPuAU3ptb/26NYxOUM4z/Rocft3ov4K3t7i Nq3g== 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=MDmlV62xy2dTAa7jUaW4qdfTp5nhVCOQRSmVDFfq7CU=; b=fkaMs7ocfr7vWHBTiQsKtE4buwZuwvHCo/csjCrVUE6f8JkicVXnEuvR15L9t7UdP6 UFPxqJxd5EbABBITL4aXf/QYoGfBPo1LoWLL9ezidbwg3qMoVtC3GJmHrOxiV1/KPOrX xMKObp/6qlA9n0y2COxPpwHXRCTIz2b/hxyL+ZBeMjN44UtAI/+bXboPpD6w+Yj44UH/ fOA2x5BATj3QXwRF5S+c9AYNxbd3C4fs3jGt30cnMbNrxsZuuMPGU6nL55ZzmUYDVNUF cV2QROwCIKaRjR3tjw7UksdURLARX71zgEQfaPTqpnoL5cAab7BOi56yCyzdWFfewSiY YV9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="P3f/TC0N"; 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 bt17si3325409ejb.333.2021.01.14.22.04.04; Thu, 14 Jan 2021 22:04:27 -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="P3f/TC0N"; 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 S1726666AbhAOGD2 (ORCPT + 99 others); Fri, 15 Jan 2021 01:03:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726430AbhAOGD1 (ORCPT ); Fri, 15 Jan 2021 01:03:27 -0500 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55525C0613CF for ; Thu, 14 Jan 2021 22:02:46 -0800 (PST) Received: by mail-lj1-x231.google.com with SMTP id m10so9155539lji.1 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=cUQyKXPV/1HQv8UIsFMUQ+ZP/kjkiicbOP7tqMSo7WP2ARobdwn4Lvz8qkx9/UyKxL kU3dhluezl3flHFGf4bK7RmEUD/3vmnY0SZnqQZaiLgye2FDIFKsuK5Wg5IM4DokhWk0 U4ReyHYMh/sqEXY2E6TfFGZDvm2tGma/SUnrm2/U4mLK4U6KGE/VFojBarsuBOxeU5mv p1/AbsHbFfGMc2yUW64nrcCqChhocbfrXkTlk0pk103AqbJTq8Vibdx4noRFGPF2hFEI jjFMRoI1W/Xq75FOLAhO77kausKdTubAXm5nyZdngKu01hk5a5pC43F34JUcVuTTT4VG lFww== X-Gm-Message-State: AOAM532Y40n03NPHyZ7Y6c6uRVX9Nw3YrwtMdyS2e3Y2bbXZgHjO7bKi TK2RahO+8pc96vtc7O/UJm81XclSdi5BZwabFohZxg== 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: linux-kernel@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