xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien@xen.org>
To: Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	Stefano Stabellini <sstabellini@kernel.org>
Cc: "tee-dev@lists.linaro.org" <tee-dev@lists.linaro.org>
Subject: Re: [PATCH] optee: enable OPTEE_SMC_SEC_CAP_MEMREF_NULL capability
Date: Mon, 10 May 2021 18:36:27 +0100	[thread overview]
Message-ID: <7d74e29f-08ec-a4fc-db39-4dbb14a8d89b@xen.org> (raw)
In-Reply-To: <20210507013938.676142-1-volodymyr_babchuk@epam.com>

Hi Volodymyr,

On 07/05/2021 02:39, Volodymyr Babchuk wrote:
> OP-TEE mediator already have support for NULL memory references. It
> was added in patch 0dbed3ad336 ("optee: allow plain TMEM buffers with
> NULL address"). But it does not propagate
> OPTEE_SMC_SEC_CAP_MEMREF_NULL capability flag to a guest, so well
> behaving guest can't use this feature.
> Note: linux optee driver honors this capability flag when handling
> buffers from userspace clients, but ignores it when working with
> internal calls. For instance, __optee_enumerate_devices() function
> uses NULL argument to get buffer size hint from OP-TEE. This was the
> reason, why "optee: allow plain TMEM buffers with NULL address" was
> introduced in the first place.
> This patch adds the mentioned capability to list of known
> capabilities. From Linux point of view it means that userspace clients
> can use this feature, which is confirmed by OP-TEE test suite:
> * regression_1025 Test memref NULL and/or 0 bytes size
> o regression_1025.1 Invalid NULL buffer memref registration
>    regression_1025.1 OK
> o regression_1025.2 Input/Output MEMREF Buffer NULL - Size 0 bytes
>    regression_1025.2 OK
> o regression_1025.3 Input MEMREF Buffer NULL - Size non 0 bytes
>    regression_1025.3 OK
> o regression_1025.4 Input MEMREF Buffer NULL over PTA invocation
>    regression_1025.4 OK
>    regression_1025 OK
> Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>

Acked-by: Julien Grall <jgrall@amazon.com>

And committed.


Julien Grall

      reply	other threads:[~2021-05-10 17:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-07  1:39 Volodymyr Babchuk
2021-05-10 17:36 ` Julien Grall [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7d74e29f-08ec-a4fc-db39-4dbb14a8d89b@xen.org \
    --to=julien@xen.org \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=sstabellini@kernel.org \
    --cc=tee-dev@lists.linaro.org \
    --cc=xen-devel@lists.xenproject.org \
    --subject='Re: [PATCH] optee: enable OPTEE_SMC_SEC_CAP_MEMREF_NULL capability' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).