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 X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A9B23C433ED for ; Fri, 21 May 2021 13:17:33 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id A726C61244 for ; Fri, 21 May 2021 13:17:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A726C61244 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 641F582E21; Fri, 21 May 2021 15:17:30 +0200 (CEST) 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="SbYvt11X"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 03FB682E40; Fri, 21 May 2021 15:17:29 +0200 (CEST) Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) (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 4831182E21 for ; Fri, 21 May 2021 15:17:26 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=etienne.carriere@linaro.org Received: by mail-ej1-x62e.google.com with SMTP id p24so29185221ejb.1 for ; Fri, 21 May 2021 06:17:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SjrEq4KK8JdQL6XZBV1LC2irb70jn69uGJ0GX1Q6ZwA=; b=SbYvt11X4KpOjYAjgxr9BrWXmct5p0PnqykhbTWfYLALm2lGLuyu31cE7lYomiYEvl QsfGt/eLFUOa+Qgg6CQCY42LnG89zlRj0dYdsULerGWHPgeOkkvpRT1l/2+DINy5jwxJ jAfjghqS/y4S0n9OoQqs4UY8Uts4eE+JTvlcV0CrV4uGUJrTZe5g4yqbJRFrFnppHnKP 6kJa8AHo9DzzSJ8qS2OFjUPQiPzU83zKbK4QcaLOc2ubiXw2KNgzrQPrNi5rvx/7zUGD rSSfVF96rAZUdy6knJ9bhn0iwVDLJQBxT6jMxPgfvz535tGQlWXn5a85EXuIxEo2hxn6 8J6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SjrEq4KK8JdQL6XZBV1LC2irb70jn69uGJ0GX1Q6ZwA=; b=C70wLcAioHjG5T/ZCmi0zTxvQM0CwZRGqUug12yLJBcBftvbROuWHspiSm0T4z88IA +H6nuWYO/KzsriEjNOYjt8hLrjQb9sqzo5SH33kUp+ARmDh1rBTz4lTzC3U/nm6SgtPX 4S5t4y2TDl03NbXqe/q211yRaxvLkMCf14u9HLK3uuQIDHffUqCs+Tr7MURTXgj+Aub0 wGuhxkLybtpGBLQ5E74dbtZQInsa/LKREayodjQ+WuzHF/9yK6lJBQFzsHh9TTcy3K8a 920pmKVlWtaw6gpGw4QK3gVZzSawYCqGfcQPpUleJA1whM/WrVB94bqsLuUT+h/UKHkR bH1A== X-Gm-Message-State: AOAM531M8UpNMc/EthMe2pTM4YlY07swT46PF7/E6uWQJu4oN8zjaY0w 7HUOYtNA3GGNiOMUNMGCoGoLXneFsZZsDUFQiFMwVXmEejgAhlRZ X-Google-Smtp-Source: ABdhPJyLRqjZvcIH41+hHE56UuHsYo4mBUr/Zxm/AMZDg/Sb+idW02mYSTpmqLWg8UvCtsasfZWrnAB7NOV77KX1Uns= X-Received: by 2002:a17:906:bb0e:: with SMTP id jz14mr10187312ejb.285.1621603045959; Fri, 21 May 2021 06:17:25 -0700 (PDT) MIME-Version: 1.0 References: <20210519142613.7668-1-etienne.carriere@linaro.org> In-Reply-To: From: Etienne Carriere Date: Fri, 21 May 2021 15:17:15 +0200 Message-ID: Subject: Re: [PATCH v2 1/2] tee: define session login identifiers To: Jens Wiklander Cc: U-Boot Mailing List , Simon Glass Content-Type: text/plain; charset="UTF-8" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.4 at phobos.denx.de X-Virus-Status: Clean On Thu, 20 May 2021 at 16:50, Jens Wiklander wrote: > > On Wed, May 19, 2021 at 4:27 PM Etienne Carriere > 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 > > --- > > 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. Okay, i'll rephrase. /* * Reserve use of GP implementation specific login method range * (0x80000000 - 0xBFFFFFFF). This range is rather being used * for REE kernel clients or TEE implementation. */ cheers, etienne > > What do others think? > > Cheers, > Jens