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 Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 53EA5C433F5 for ; Sat, 25 Dec 2021 19:39:34 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A8444836D7; Sat, 25 Dec 2021 20:39:31 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="u1EuPMtV"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 24E3C836D7; Sat, 25 Dec 2021 20:39:30 +0100 (CET) Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8316F830C4 for ; Sat, 25 Dec 2021 20:39:26 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-wr1-x430.google.com with SMTP id s1so23659132wra.6 for ; Sat, 25 Dec 2021 11:39:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=41UG+xrufJ5T1wzCHsdo2wqLxneIK5gF+oopRjiEqpA=; b=u1EuPMtViX3ZeaCM28JPN6F3hp6ggDBxuytS7tanXrjabll85DlgGIU9e2kUye2blu HZjoph5rS5Zh71eRxZOO/bJRPjqUDE9Vye2qWb0oqySp6aerooTEFproQYIJgrcOOxNJ uoMurh6OqAzfVUj8VEsP0hLd+QHJynjdRsuUW4goBQf/QCEToHgaLfI0KmEj2VTq5+2Q 6aVYNs63FcWWEEtU9eHmrJ3wwObJCATRx4iqx+9Ymvm2RMxkNSxcZP854qmu034BDdql uo46HMsG3ic9EZQTc7ogqD/4d3oHWAk5jUZg/B8Au5VvAJT8mazP7b9zddjBa+kTNZ2r wEwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=41UG+xrufJ5T1wzCHsdo2wqLxneIK5gF+oopRjiEqpA=; b=kCOwa3hEhiDkdR+3G7vaxtbBk/0RiiJ6gUSFbQxrUF6Xlf9N4M8wiwVMffscn3hfUt UxMWjZATVgkqkjFUO1FG1h5esFtfaKNB8OMnWP/IBAnj4TQyQ9Q2LLLxWn4BM6oI4K85 WrZTsKXt9UopVLPUhEK+cKtEWBgAnxOxyq5yizwqH7XsD/Yopkx2BGMK7eQqnohok93I +3eSgrFX5P52/VX5sdQpeYzDbT0kiSAM/1kP6GcekZ0WlfK9/Q+2ep4stTRQSxZQSqvw KOFW3inh/QIe+lofMr533ESrUIfaoczafXXfo2aGXcVGkwiGN6AUSvaIKrkW7ikVkMjq zEtA== X-Gm-Message-State: AOAM530dESB4iW2rLCd92IWNmj6KLkSkBfBpWPBUrAI2LK2qupeawyHy GBDiLzjNqaVwgWL5LzEd8lwLuQ== X-Google-Smtp-Source: ABdhPJx3mUgSZy6BQ0yCmJ46cCCc8K4+x7ML/btoru7kZ7uQD30u9ZytjypdKnPWUy6EnRyHRycfEg== X-Received: by 2002:adf:d213:: with SMTP id j19mr7899507wrh.325.1640461166124; Sat, 25 Dec 2021 11:39:26 -0800 (PST) Received: from hades (athedsl-4461669.home.otenet.gr. [94.71.4.85]) by smtp.gmail.com with ESMTPSA id b6sm8467480wri.56.2021.12.25.11.39.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Dec 2021 11:39:25 -0800 (PST) Date: Sat, 25 Dec 2021 21:39:23 +0200 From: Ilias Apalodimas To: Heinrich Schuchardt Cc: Ilias Apalodimas , Ying-Chun Liu , Jens Wiklander , Alexander Graf , U-Boot Mailing List Subject: Re: [PATCH v2] efi_loader: Don't limit the StMM buffer size explicitly Message-ID: References: <20211224080841.98906-1-ilias.apalodimas@linaro.org> <93e2906d-33a5-34b4-38f3-aad27a4aef36@gmx.de> <86CEA110-CBA3-4661-8742-3C4838D3660C@gmx.de> <93e7b044-163f-4828-abd9-a9631ecc2ae8@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <93e7b044-163f-4828-abd9-a9631ecc2ae8@gmx.de> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On Sat, Dec 25, 2021 at 05:13:23PM +0100, Heinrich Schuchardt wrote: > On 12/25/21 16:04, Ilias Apalodimas wrote: > > > > > > On Sat, 25 Dec 2021, 16:28 Heinrich Schuchardt, > > wrote: > > > > > > > > Am 25. Dezember 2021 12:16:29 MEZ schrieb Ilias Apalodimas > > >: > > >> > > > >[...] > > >> >    rc = tee_invoke_func(conn.tee, &arg, 2, param); > > >> >    tee_shm_free(shm); > > >> > +  /* > > >> > +   * Although the max payload is configurable on StMM, we > > only share > > >> > +   * four pages from OP-TEE for the non-secure buffer used to > > communicate > > >> > +   * with StMM. OP-TEE will reject anything bigger than that > > and will > > >> > +   * return.  So le'ts at least warn users > > >> > +   */ > > The comment mentioning four pages does not make too much sense to me as > both OP-TEE as well as U-Boot can be configured to other sizes. > The pages that op-tee uses are not configurable. What is configurable is the number of pages you can request op-tee to map from the non-secure world for u-boot sharing. However the four page restriction I refer to is an internal op-tee one and refers to the non-secure world buffer it shares with StandAloneMM, not u-boot [1] [...] [1] https://github.com/OP-TEE/optee_os/blob/master/core/arch/arm/kernel/stmm_sp.c#L73 Cheers /Ilias