Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1223266rwd; Thu, 25 May 2023 09:32:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ40/SpsoTL04GvueWdz+2CdOcVIb6Q3roycux6zjVKaWNn40Y65b2v0LE1xhnDM8z2ojUBf X-Received: by 2002:a17:90b:1182:b0:24e:df1:df8 with SMTP id gk2-20020a17090b118200b0024e0df10df8mr2064065pjb.49.1685032324646; Thu, 25 May 2023 09:32:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685032324; cv=none; d=google.com; s=arc-20160816; b=m4GllRpb9YFpZopg7nk9y9a3FAAQ3ezKYh9xj1x0mJ6WSvITvMYXivfHOWppdERcIx QbapzF87dej/1lj61GL2h3dQGALnkeqSb2fc4n+LVz4QV5BiOKynHJSR8pdsUHlDehQU ilt0FU5pmE4YV8jxaHF1x5ob9iP8EIXjv/PJmzSPf676eL/1OFv5N7LFiXJHXP/bxtK3 kNfUz+K60D0G6h6zZ2PN8GCoYOkvBSl79BX1p0YxrQAnFldRlnjt4dzx3uPWlln3hwbg +jc2G43fLXTbe0DkR9l3fII17Eht3RPWMjoN/bvxOIIHkFxaDUoS/06xRHWS2syY3TNL vWJg== 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=qO27jd8viKrfSl6bxUkfamFHYtGbMGqZC8tvXhjBjs0=; b=qWf7DeAW6gX++7Nosjr0xIEHXIIM8ZqaAtI6QlWM/NfCcirbb82Dt1jiR8yM2t8NF3 xA3upgk27zZPjBHtldVGVeB4utiUG6o27gcqvf+qibxazrVHl+pAtFrrLS6dc+brzhpS XEit7T4aJPWnsbIJcWNuuaNrAvpvDiuuBFvjs2ViwEMeWSW61sL0aHqbZ1PLCJQoaY6A m5DiCUrj7tXdTn+kDyYPREWaOA+WI/HBnCwzdW8FeRMCYHF+I6zWrWnFWFK1mXeKHatk Ewtz4dswy4YcnaTX3vNhwfTLIHzAa69hdSWPQhuzVcRd4hkYTSMZa4xXPhNGbNZYfqwA hvpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=t6zWjU+r; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h128-20020a636c86000000b00528d90d40e4si1440713pgc.88.2023.05.25.09.31.51; Thu, 25 May 2023 09:32:04 -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=@kernel.org header.s=k20201202 header.b=t6zWjU+r; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233700AbjEYQMJ (ORCPT + 99 others); Thu, 25 May 2023 12:12:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231133AbjEYQMH (ORCPT ); Thu, 25 May 2023 12:12:07 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E06210B for ; Thu, 25 May 2023 09:11:43 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 66AC364754 for ; Thu, 25 May 2023 16:11:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CF5D3C433D2 for ; Thu, 25 May 2023 16:11:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685031087; bh=68dx/rY90NC8wOI8hV0HFjV/zhhCrF1GhBmt0/6FRNA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=t6zWjU+rpy64Noy0yJkZh49d1OFrOb/tDGUyWXn3E25ibTA0yHHUxaWuJfSDpFjNd SsxRlYpmL0yHtr6NoJ9NRUCSb6Ck7gByHkZBV40sXtsYrnz75WOLEw2oHV87gDIAac qVTsAkprOwLJgVh6glafUQiuPdkB3GI3XAzKFIuqX3XveX2nfIpQeQVuHXlhf71nGG Qd51Q3eRzYeZ5lD0xlLKVUDSQfUGjgp5kUP+1cBBeHq9tcex1I72PqaEx4m8yMZ6iv CaOnp0O57WTDEHbtBwSB735s/EYUJMijzeFqtsL1cIVkAlIRvc8Q0iDZ4edfKteRmF 9MNz9XXEEsTNg== Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-4f37b860173so2776165e87.2 for ; Thu, 25 May 2023 09:11:27 -0700 (PDT) X-Gm-Message-State: AC+VfDyEL39hzpRjI3+GukHO/3oSqWI4mFcxv5uRUez2X5aerm8RWirl 8aPsJMjhzpTchD5VlLOlhbUeuRRUIKdPoJfReao= X-Received: by 2002:ac2:51ad:0:b0:4f3:a3e0:8502 with SMTP id f13-20020ac251ad000000b004f3a3e08502mr6374558lfk.33.1685031085799; Thu, 25 May 2023 09:11:25 -0700 (PDT) MIME-Version: 1.0 References: <20230523090607.1433-1-masahisa.kojima@linaro.org> In-Reply-To: From: Ard Biesheuvel Date: Thu, 25 May 2023 18:11:14 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 0/3] introduce tee-based EFI Runtime Variable Service To: Ilias Apalodimas Cc: Sumit Garg , Masahisa Kojima , Jens Wiklander , linux-kernel@vger.kernel.org, op-tee@lists.trustedfirmware.org, Johan Hovold Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Wed, 24 May 2023 at 10:01, Ilias Apalodimas wrote: > > Hi Sumit, > > On Wed, 24 May 2023 at 10:56, Sumit Garg wrote: > > > > On Tue, 23 May 2023 at 14:36, Masahisa Kojima > > wrote: > > > > > > This series introduces the tee based EFI Runtime Variable Service. > > > > > > The eMMC device is typically owned by the non-secure world(linux in > > > this case). There is an existing solution utilizing eMMC RPMB partition > > > for EFI Variables, it is implemented by interacting with > > > OP-TEE, StandaloneMM(as EFI Variable Service Pseudo TA), eMMC driver > > > and tee-supplicant. The last piece is the tee-based variable access > > > driver to interact with OP-TEE and StandaloneMM. > > > > > > Changelog: > > > v3 -> v4: > > > - replace the reference from EDK2 to PI Specification > > > - remove EDK2 source code reference comments > > > - prepare nonblocking variant of set_variable, it just returns > > > EFI_UNSUPPORTED > > > - remove redundant buffer size check > > > - argument name change in mm_communicate > > > - function interface changes in setup_mm_hdr to remove (void **) cast > > > > I don't have detailed insights into how EFI spec mandates StandaloneMM > > should be implemented. But utilizing OP-TEE as the underlying > > transport here looks fine to me. FWIW, > > > > For the series: > > Acked-by: Sumit Garg > > Thanks! > > FWIW the PI spec describes some of the functionality and how that > should be accessed. > There's a EFI_MM_COMMUNICATION_PROTOCOL which is not used here. > Instead the entry point is via an SMC to op-tee and the payload > adheres to what the PI spec describes in its EFI_MM_COMMUNICATE_HEADER > Thanks for the resend Could you please double check whether this needs any changes in relation to this patch? https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git/commit/?id=d86ff3333cb1d5f4