Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1128073rwd; Wed, 7 Jun 2023 11:22:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5R8EONEPsMW/cAVPWT2wk02YJahe9+4nAU0vYCoxcUjWrTQt9FaSyeesIN8igLuID5yYIX X-Received: by 2002:a05:6a20:2450:b0:10d:1fba:7371 with SMTP id t16-20020a056a20245000b0010d1fba7371mr1973427pzc.5.1686162149334; Wed, 07 Jun 2023 11:22:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686162149; cv=none; d=google.com; s=arc-20160816; b=T7VtbUga5GV9XDdRThoAcOJQJuSuZcJn9P8dXklrCKwFBSUkSu7ueP5E3plO/uTMWy KZA3Uu0ID99LIMdxXwQdo8OmhedM6NdO5VhYuyoUopAX2KTldKSsdRmwhB6+2VT5y5+P meqO4/CaBSu/D/uxwa2YaNM5y3hx2xdZEdNNtcuR0mVDEcxRFqZ3ydDtC46Or/Q8/YBe 07YeFocwBbrd912MMLcBL2apW7v7ZpNU2hZgr1vSoL0R8fvkDYfo5TYdy0+EUBSEJ5KJ zcncDWwucaSs85tCuImwUeZq5Ng2Mm87XftqV3ouz0kLuixgmovnUQg3+k7yyzKcT8mI sfsA== 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=ZZ/p0iLnlO9hRGL6F3e88TDXKCDJ3Ln5sjh3/Y6FySE=; b=ODfSMibagqP3gM+KTHoK3W2E3npye/sQG/hwSEnhkxmAF2dL00jp5sa6oqTlCFsdLW PMS4DuYlt8Npd4r86FtYq3VxlrYrwnw7q7+DHeoZTil/mtPvEoMTYucPfK/2erFVkNQJ PqWWsZLgggPgwma/seDMEixREmhVhPOusFTp6DCsb2ZlCCdZyd5TmgPTPxX6FKb0DRjo rPMg2RinLoyuwiPu+lsnEavMOHPzX8zv1nuO/CZXuQnIFanKC7c2DPSDeuFi5ZfEa5ed 1SMinDueZWsI/lPWJjsw/bP8maO11FFN+mj4wby/nL8E09G/ZNCd1jBdiqeJKvVLEzmz fr6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zDSxFnUb; 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 j65-20020a638b44000000b0053eefa04db9si9177648pge.48.2023.06.07.11.22.17; Wed, 07 Jun 2023 11:22:29 -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=zDSxFnUb; 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 S232305AbjFGSSq (ORCPT + 99 others); Wed, 7 Jun 2023 14:18:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231712AbjFGSSl (ORCPT ); Wed, 7 Jun 2023 14:18:41 -0400 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF1551FD7 for ; Wed, 7 Jun 2023 11:18:30 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2b1b66a8fd5so64164551fa.0 for ; Wed, 07 Jun 2023 11:18:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686161909; x=1688753909; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ZZ/p0iLnlO9hRGL6F3e88TDXKCDJ3Ln5sjh3/Y6FySE=; b=zDSxFnUbIcCjqY5ly3/D4UTfuVwXpVyLZrw7RvR1qPR5BIGmN9aat/Y68xabimzaUY 3M7aOc5RUo5y8Jorgp9FtZqmAtFvfWhXe2Q9IJjp6+zyUVw1/P4SNfGWSp6YcY2v+Gly ymQRaIWlAjqyFEWHYtETDUE9a6OIjVSvcK1cHjd+B1qDDYmCL4R6qUDjysbpZ20d6g2U latCjJ4S/Dfy2SaE1Zc3YjHUkDC+TXDYzJSYiBMDCqdCcxY2xYnnWQF0oIdl38qA5YLT U6By/Jq4Dny7Zfxr8PSW958EUNkW3uxA3U8YKQ6SGY+lA5T9LjuA7zJ+2qYCsWSHx6cb jfvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686161909; x=1688753909; h=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=ZZ/p0iLnlO9hRGL6F3e88TDXKCDJ3Ln5sjh3/Y6FySE=; b=JDoZNYaTVge5ObQjUP0kQG0t/pCOeB+zHWXo9uJlreaYLRvw7dihE20VwuA4zXDu0J SAWatz4452cFLvFPk1Dy9LOtyxnY8agfJ9xJuh0YKP/LfYe5b+S4kOfClRbHv2rU8kBP KHi6jMQeNd+nnwh+l/Vnbp5kOOkBpow/zZvt4yxVZIC8VpH+gM9SnIwPMUynJQ2nr2lf 9DacwJ4z4EAP9Zacmt04GeFIo+bI0moLzr7raOqycOkuKcY59ezJ5LeOG1VKppEUSFhw 276Pzi1H99KaHpRmXMLup8c3xGteD99u9qjw9MS27b1aYt0mbpOInlSSZ1gcP1uG/vG8 Kv/w== X-Gm-Message-State: AC+VfDzqPMpvZYT7hFo0xsVOtZECZjv8UubnoYTvgN/1xt8hugnYnNNB XHcrYX/tTf+wa7Xi4kszSHpfPHKMYns9DSj6gL9RCg== X-Received: by 2002:a2e:730c:0:b0:2b1:ed29:7c47 with SMTP id o12-20020a2e730c000000b002b1ed297c47mr2455880ljc.8.1686161909028; Wed, 07 Jun 2023 11:18:29 -0700 (PDT) MIME-Version: 1.0 References: <20230526010748.1222-1-masahisa.kojima@linaro.org> <20230526010748.1222-4-masahisa.kojima@linaro.org> <0d3e0370-eb76-010f-3d30-9acc9b59645c@siemens.com> <4ff09002-e871-38b9-43ec-227a64bac731@siemens.com> <76da826f-b608-6add-5401-6de818b180e3@siemens.com> In-Reply-To: From: Ilias Apalodimas Date: Wed, 7 Jun 2023 21:17:52 +0300 Message-ID: Subject: Re: [PATCH v5 3/3] efi: Add tee-based EFI variable driver To: Jan Kiszka Cc: Sumit Garg , Ard Biesheuvel , Masahisa Kojima , Jens Wiklander , linux-kernel@vger.kernel.org, op-tee@lists.trustedfirmware.org, Johan Hovold , Maxime Coquelin , Alexandre Torgue , linux-efi@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, "Su, Bao Cheng (RC-CN DF FA R&D)" Content-Type: text/plain; charset="UTF-8" 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=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, 7 Jun 2023 at 20:14, Jan Kiszka wrote: > > On 07.06.23 18:59, Ilias Apalodimas wrote: > > On Wed, 7 Jun 2023 at 19:09, Ilias Apalodimas > > wrote: > >> > >> Hi Jan, > >> > >> [...] > >>>>>> No I don't, this will work reliably without the need to remount the efivarfs. > >>>>>> As you point out you will still have this dependency if you end up > >>>>>> building them as modules and you manage to mount the efivarfs before > >>>>>> those get inserted. Does anyone see a reasonable workaround? > >>>>>> Deceiving the kernel and making the bootloader set the RT property bit > >>>>>> to force the filesystem being mounted as rw is a nasty hack that we > >>>>>> should avoid. Maybe adding a kernel command line parameter that says > >>>>>> "Ignore the RTPROP I know what I am doing"? I don't particularly love > >>>>>> this either, but it's not unreasonable. > >>>>> > >>>>> In the context of https://github.com/OP-TEE/optee_os/issues/6094, > >>>>> basically this issue mapped on reboot/shutdown, I would really love to > >>>>> see the unhandy tee-supplicant daemon to be overcome. > >>>> > >>>> I have seen this error before and it has been on my todo list. So I > >>>> have tried to fix it here [1]. Feel free to test it and let me know if > >>>> you see any further issues. > >>>> > >>>> [1] https://lkml.org/lkml/2023/6/7/927 > >>>> > >>> > >>> Ah, nice, will test ASAP! > >>> > >>> Meanwhile more food: I managed to build a firmware that was missing > >>> STMM. But the driver loaded, and I got this: > >> > >> Thanks for the testing. I'll try to reproduce it locally and get back to you > > > > Can you provide a bit more info on how that was triggered btw? I would > > be helpful to know > > > > - OP-TEE version > > Today's master, 145953d55. > > > - was it compiled as a module or built-in? > > Sorry, not sure anymore, switching back and forth right now. I think it > was built-in. > > > - was the supplicant running? > > Yes. > Ok thanks, that helps. I guess this also means U-Boot was compiled to store the variables in a file in the ESP instead of the RPMB right? Otherwise, I can't see how the device booted in the first place. Thanks /Ilias > Jan > > -- > Siemens AG, Technology > Competence Center Embedded Linux >