Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1893472rwd; Fri, 2 Jun 2023 01:29:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7undnX3BNI1wqJCTSqWx+jvnHVkdZDH00/ar3Zp1HvObfWCZY2bBg8KOKFDl4NMV7AI1k0 X-Received: by 2002:a05:6808:914:b0:396:4bbc:9a2d with SMTP id w20-20020a056808091400b003964bbc9a2dmr1753593oih.27.1685694556204; Fri, 02 Jun 2023 01:29:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685694556; cv=none; d=google.com; s=arc-20160816; b=mkKvAw+4gNQNIq6jY9VT8Y7d2EOf+suVBMmhyqMEr7pJDHp98D7ai6FKiDpNBWOJzi 0VfmbP/nE4WF0wRXJp4SEy3hZjSBTTHUhuVrBQXTWREWVt7hCnkeBFWu/FVeutZ1ERpa GCou3HlI8+oq/M+mBfzajq2nvTmfRVUBAvF9YtzS5o1Bkeg6tgAam3Rmlyxq9mAr7K27 B5ZYf/l/h20y76zVp86h1EB08F4k1CwI9ugzeYtzBLElbu/OPHvDT4F7uFb1+1iB3uN/ sxH2nhdVlZHjHtsdEXp0ziZaJWuImLgfUWHZ//v6QVf0dAG8hfVGmgQF9A72072Y6rLa gzrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=SH+XgwSwmVykCt6k705IeR4vpGlDvItlRo4YBIrE2zM=; b=tzZaDaB37FnMMs+RN11BhfAJcooTUvI+uzQgcD+ZhqBfgVgqsRqJ1BzJkwlD4oomQc MbvoY6HuEkPatzNw1QQyZROJJbNtCGHWMqkaqfeTgF2awc4IlUfyGvb8sXDDPahJPwVR TKrN1zi5aN7hiSmWfoGiligwkSL7dw2LdF7w+CGeLhKXSgptKpfw1ZBHKQlcMgIVyOWZ WRLqKWZi7NE4hdPMM/QdbAgCRUmFy8LHlN+/5a3g8XHde+3+R7TYqHWWuNcBo40uc3kK IDMTPlOisCLJJevvjJPiK0E0gEeFzZFKiPCyYJ3KL2NHQbgBn5AQ7TNy0FlMC0aP4JJq MJhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aqiWVm4c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h2-20020a170902f54200b001addf547a59si615278plf.0.2023.06.02.01.29.03; Fri, 02 Jun 2023 01:29:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aqiWVm4c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S234639AbjFBI1g (ORCPT + 99 others); Fri, 2 Jun 2023 04:27:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234635AbjFBI1F (ORCPT ); Fri, 2 Jun 2023 04:27:05 -0400 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A56C10DB for ; Fri, 2 Jun 2023 01:26:24 -0700 (PDT) Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2af2d092d7aso25604491fa.2 for ; Fri, 02 Jun 2023 01:26:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685694382; x=1688286382; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=SH+XgwSwmVykCt6k705IeR4vpGlDvItlRo4YBIrE2zM=; b=aqiWVm4c8Hn8cSRfsEJ/hmI3VoIAlmpI9kl1DqSIqgEaURRaI7eKgth0koicQfVIfe bCG9Lwed6N8mrzvAYua8KP2qCKJjzh164f0siWfvkIYThmwyY0BCLWiqqoq39w88sgua VgPuHyr6sRb5mH03MbTPb4NFu2bPSfIPF4KLIkqCnNBfZRpNcbJUxkoRCuDIWl69UukN QCk29QYHTBnJDtsxX/4Fp1eFcrLQJz5FYcSWvyO3VHWzErfyb9dro5NyUHyJyYj8u/ly CYXn2i6mVLKymc8LiCFVhNufS4gmv927LZgCF0HxxJETkeEi31GEJGQXCAKOiZAQf1ab /dcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685694382; x=1688286382; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SH+XgwSwmVykCt6k705IeR4vpGlDvItlRo4YBIrE2zM=; b=M7UX9/AIsrxkbYIsOuwUEwVYaQIlx+rdnX0is2jTmx5u+nh0d9OuOSSSbLKoGGC21B Q93eWpveMCVtny9Sg6BpXk1SySwFu21fDvrdFJoPAZQnLUmDmocH0TosJQoRRHd4PCZy MSsTnbelvle9qZO2hwQq+Kf1WUwICjdCz+W1A8gZUtGgpMys5XMI5zK3KOA323a6WJPv nGu7ABojcQ2LPx1ewxRZbQzQg68gyCeRReER5d8yGx2oY2BlzoQjE76htwt649TTxRej MV4Ye2jXD/T/8DCX2/ZM4F7M0Lm1dqKGgYlZuWj2CV0YprIzhmPFW7VzaMvk1RwWdEFt 85IA== X-Gm-Message-State: AC+VfDxiOYLNEQN9WpGbk2LhNLmVyDkH7K9JvcY8nhF0NJfrQ3+vmpX6 DgUArdjExm3qEgxGqXt8l1khEWenCRNKqTL6NakADw== X-Received: by 2002:a2e:9a8e:0:b0:2b1:b040:b5ff with SMTP id p14-20020a2e9a8e000000b002b1b040b5ffmr465605lji.4.1685694382379; Fri, 02 Jun 2023 01:26:22 -0700 (PDT) MIME-Version: 1.0 References: <20220405093759.1126835-1-alex.bennee@linaro.org> <20230531191007.13460-1-shyamsaini@linux.microsoft.com> In-Reply-To: From: Ilias Apalodimas Date: Fri, 2 Jun 2023 11:25:46 +0300 Message-ID: Subject: Re: [PATCH v2 0/4] rpmb subsystem, uapi and virtio-rpmb driver To: Sumit Garg Cc: "Zhu, Bing" , Shyam Saini , "alex.bennee@linaro.org" , "code@tyhicks.com" , "Matti.Moell@opensynergy.com" , "arnd@linaro.org" , "hmo@opensynergy.com" , "joakim.bech@linaro.org" , "linux-kernel@vger.kernel.org" , "linux-mmc@vger.kernel.org" , "linux-scsi@vger.kernel.org" , "maxim.uvarov@linaro.org" , "ruchika.gupta@linaro.org" , "Winkler, Tomas" , "ulf.hansson@linaro.org" , "Huang, Yang" , "jens.wiklander@linaro.org" , "op-tee@lists.trustedfirmware.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 1 Jun 2023 at 08:49, Sumit Garg wrote: > > On Thu, 1 Jun 2023 at 11:02, Ilias Apalodimas > wrote: > > > > Hi Bing > > > > On Thu, 1 Jun 2023 at 04:03, Zhu, Bing wrote: > > > > > > As an alternative, Is it possible to change ftpm design not to depend= on RPMB access at the earlier/boot stage? Because to my understanding, typ= ically PCRs don't require persistent/NV storage (for example, before RPMB o= r tee-supplicant is ready, use TEE memory instead as temporary storage) > > > > I am not entirely sure this will solve our problem here. You are > > right that we shouldn't depend on the supplicant to extend PCRs. But > > what happens if an object is sealed against certain PCR values? We > > are back to the same problem > > +1 > > Temporary storage may be a stop gap solution for some use-cases but > having a fast path access to RPMB via kernel should be our final goal. > I would suggest we start small with the MMC subsystem to expose RPMB > access APIs for OP-TEE driver rather than a complete RPMB subsystem. I discussed with the OP-TEE maintainers about adding parts of the supplicant in the kernel. The supplicant 'just' sends an ioctl to store/read stuff anyway. So it would make sense to have a closer and see if that looks reasonable. Thanks /Ilias > > -Sumit > > > > > Thanks > > /Ilias > > > > > > Bing > > > > > > IPAS Security Brown Belt (https://www.credly.com/badges/69ea809f-3a96= -4bc7-bb2f-442c1b17af26) > > > System Software Engineering > > > Software and Advanced Technology Group > > > Zizhu Science Park, Shanghai, China > > > > > > -----Original Message----- > > > From: Shyam Saini > > > Sent: Thursday, June 1, 2023 3:10 AM > > > To: alex.bennee@linaro.org > > > Cc: code@tyhicks.com; Matti.Moell@opensynergy.com; arnd@linaro.org; Z= hu, Bing ; hmo@opensynergy.com; ilias.apalodimas@linaro= .org; joakim.bech@linaro.org; linux-kernel@vger.kernel.org; linux-mmc@vger.= kernel.org; linux-scsi@vger.kernel.org; maxim.uvarov@linaro.org; ruchika.gu= pta@linaro.org; Winkler, Tomas ; ulf.hansson@linar= o.org; Huang, Yang ; sumit.garg@linaro.org; jens.wikl= ander@linaro.org; op-tee@lists.trustedfirmware.org > > > Subject: [PATCH v2 0/4] rpmb subsystem, uapi and virtio-rpmb driver > > > > > > Hi Alex, > > > > > > [ Resending, Sorry for the noise ] > > > > > > Are you still working on it or planning to resubmit it ? > > > > > > [1] The current optee tee kernel driver implementation doesn't work w= hen IMA is used with optee implemented ftpm. > > > > > > The ftpm has dependency on tee-supplicant which comes once the user s= pace is up and running and IMA attestation happens at boot time and it requ= ires to extend ftpm PCRs. > > > > > > But IMA can't use PCRs if ftpm use secure emmc RPMB partition. As opt= ee can only access RPMB via tee-supplicant(user space). So, there should be= a fast path to allow optee os to access the RPMB parititon without waiting= for user-space tee supplicant. > > > > > > To achieve this fast path linux optee driver and mmc driver needs som= e work and finally it will need RPMB driver which you posted. > > > > > > Please let me know what's your plan on this. > > > > > > [1] https://optee.readthedocs.io/en/latest/architecture/secure_storag= e.html > > > > > > Best Regards, > > > Shyam