All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Wiklander <jens.wiklander@linaro.org>
To: u-boot@lists.denx.de
Subject: [PATCH v2 1/2] tee: define session login identifiers
Date: Thu, 20 May 2021 16:49:55 +0200	[thread overview]
Message-ID: <CAHUa44GarsbfZdzzzMmOMLe+4wt+A7XgXPVr20LQ6i-pUvLcEw@mail.gmail.com> (raw)
In-Reply-To: <20210519142613.7668-1-etienne.carriere@linaro.org>

On Wed, May 19, 2021 at 4:27 PM Etienne Carriere
<etienne.carriere@linaro.org> wrote:
>
> Define identifiers for clnt_login field in struct tee_open_session_arg
> based in GlobalPlatform Device TEE IDs and on the REE_KERNEL identifier
> extension from OP-TEE OS.
>
> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
> ---
> Changes since v1:
> - Rename macros to TEE_LOGIN_* and use same inline description as made
>   in Linux kernel source tree.
> ---
>  include/tee.h | 23 +++++++++++++++++++++--
>  1 file changed, 21 insertions(+), 2 deletions(-)
>
> diff --git a/include/tee.h b/include/tee.h
> index 99367b258e..d56530653c 100644
> --- a/include/tee.h
> +++ b/include/tee.h
> @@ -31,6 +31,25 @@
>  #define TEE_PARAM_ATTR_MASK                    (TEE_PARAM_ATTR_TYPE_MASK | \
>                                                  TEE_PARAM_ATTR_META)
>
> +/*
> + * Global Platform login identifiers for tee_open_session_arg::clnt_login
> + */
> +#define TEE_LOGIN_PUBLIC                  0x00000000
> +#define TEE_LOGIN_USER                    0x00000001
> +#define TEE_LOGIN_GROUP                   0x00000002
> +#define TEE_LOGIN_APPLICATION             0x00000004
> +#define TEE_LOGIN_APPLICATION_USER        0x00000005
> +#define TEE_LOGIN_APPLICATION_GROUP       0x00000006
> +/*
> + * Disallow user-space to use GP implementation specific login
> + * method range (0x80000000 - 0xBFFFFFFF). This range is rather
> + * being reserved for REE kernel clients or TEE implementation.
> + */
> +#define TEE_LOGIN_REE_KERNEL_MIN          0x80000000
> +#define TEE_LOGIN_REE_KERNEL_MAX          0xBFFFFFFF
> +/* Private login method for REE kernel clients */
> +#define TEE_LOGIN_REE_KERNEL              0x80000000
> +

I might be a bit odd to talk about user-space in U-Boot, but I suppose
it's still good to know how this is supposed to work later in the
kernel too.

What do others think?

Cheers,
Jens

  parent reply	other threads:[~2021-05-20 14:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-19 14:26 [PATCH v2 1/2] tee: define session login identifiers Etienne Carriere
2021-05-19 14:26 ` [PATCH v2 2/2] tee: optee: support session login as REE kernel Etienne Carriere
2021-05-20 14:56   ` Jens Wiklander
2021-05-21 13:13     ` Etienne Carriere
2021-05-20 14:49 ` Jens Wiklander [this message]
2021-05-21 13:17   ` [PATCH v2 1/2] tee: define session login identifiers Etienne Carriere

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=CAHUa44GarsbfZdzzzMmOMLe+4wt+A7XgXPVr20LQ6i-pUvLcEw@mail.gmail.com \
    --to=jens.wiklander@linaro.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.