From patchwork Thu Nov 4 14:14:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Etienne Carriere X-Patchwork-Id: 1551008 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=Sr95ys0Q; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (unknown [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HlQf30v97z9s1l for ; Fri, 5 Nov 2021 01:15:39 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6D4A9836BA; Thu, 4 Nov 2021 15:15:15 +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="Sr95ys0Q"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C79C783661; Thu, 4 Nov 2021 15:15:07 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) (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 43176836B6 for ; Thu, 4 Nov 2021 15:15:01 +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=etienne.carriere@linaro.org Received: by mail-wr1-x42e.google.com with SMTP id u1so8818940wru.13 for ; Thu, 04 Nov 2021 07:15:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=i0AtVjhXgRh06Cp/emcmQ3+3UE7HllINNnRyXfax+eI=; b=Sr95ys0QgtrDhv0CFA2XgA60QEfv2e/1fUhHrEeLpOrItUu/Zo2EK97d/dEsG2VmIu j9GZHSuOx0NGAWz10mw3d4EU+F4dO/k5ivB66Lzwq22MxMj748XwwFfLsdEk8Xxo26GB N4KHu5hLY8QQX1IA05tavinJXiAGUMzivp+LvmzYVPjMifS5kETL9dBk6eNkyswEV/QB MOEb6wOMy0Pg99E6Hzrl7/swLA/X8WSw2h4FhWN4UXPnemo9FGJzFLFk25arWrFCINuz DTY/RLns3PUmQTWcKA7XPhmCNt2JFuFSxKUj3YtSj+TpYfzxSVZWfhi9/5tZxesIZMji /BVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=i0AtVjhXgRh06Cp/emcmQ3+3UE7HllINNnRyXfax+eI=; b=lCjbhVWeWjOW/o2fc/0l8umn2HxEYaS7vPnrx3FK/1l46del8/H5LvhAsVb+ELX9jT W04l8OhGVmM2MhGCA1V2bGZKA7PPK0IXVI6tajHniG1VRnDuP1N85TNC8txJHXdhdRLK lDjPxfdJwNmjODo+qML8TEaxuEN4YB8GsxbwwDjtcAtOtpPaHxEFTVmxCtKpOy0GEACL 2/+ULc/JL3YtJH8/5y/UCiUVTqeah0xVWW1o09ORZsqIjAis/z/jdp7fKtrPL6onoZn0 oN2kzH5Dwhzx83llzZhpvUmbOEHL5XzFt/yuFUCRuGheful0qiHDCM4xYn3A9kj7KtXr IFpw== X-Gm-Message-State: AOAM532fq9L+5ocd2GK9DYMDH1GI9H3WVppSRz5pXO3t3+4234iVUajF 2EEoaTVavHjuCOJy6JCTEmjkwdHTrR5X4Q== X-Google-Smtp-Source: ABdhPJysht8p87B66QmR7ZYSl/KVhMXyesvniRFlCPDGNNT3HXXutpxocLRlBLLmk1+H0dztlldHjw== X-Received: by 2002:a5d:674c:: with SMTP id l12mr4157962wrw.439.1636035300390; Thu, 04 Nov 2021 07:15:00 -0700 (PDT) Received: from lmecxl0524.lme.st.com ([2a04:cec0:10b3:52ee:40ee:3a6f:5eb8:bd35]) by smtp.gmail.com with ESMTPSA id l26sm5354862wms.15.2021.11.04.07.14.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Nov 2021 07:14:59 -0700 (PDT) From: Etienne Carriere To: u-boot@lists.denx.de Cc: Etienne Carriere , Jens Wiklander Subject: [PATCH 2/5] tee: optee: remove unused duplicated login Id macros Date: Thu, 4 Nov 2021 15:14:48 +0100 Message-Id: <20211104141451.29967-2-etienne.carriere@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211104141451.29967-1-etienne.carriere@linaro.org> References: <20211104141451.29967-1-etienne.carriere@linaro.org> 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.103.2 at phobos.denx.de X-Virus-Status: Clean Remove unused OPTEE_MSG_LOGIN_* ID macros as suitable TEE_LOGIN_* ID macros are already defined tee.h. Cc: Jens Wiklander Signed-off-by: Etienne Carriere Reviewed-by: Patrick Delaunay Reviewed-by: Jens Wiklander --- This change was previously discussed in the U-Boot ML, latest is "[PATCH v2 2/2] tee: optee: support session login as REE kernel", at: https://patchwork.ozlabs.org/project/uboot/patch/20210519142613.7668-2-etienne.carriere@linaro.org/ Changes since this v2 post: - Remove sanitation of the login Id passed to OP-TEE as secure world - Rephrase header line since this change now simply remove duplicated macros. - Update OPTEE_MSG_CMD_OPEN_SESSION inline description comment with a reference to TEE_LOGIN_* macros. --- drivers/tee/optee/optee_msg.h | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/tee/optee/optee_msg.h b/drivers/tee/optee/optee_msg.h index 8d40ce60c2..a8ef926a48 100644 --- a/drivers/tee/optee/optee_msg.h +++ b/drivers/tee/optee/optee_msg.h @@ -86,16 +86,6 @@ #define OPTEE_MSG_ATTR_CACHE_MASK GENMASK(2, 0) #define OPTEE_MSG_ATTR_CACHE_PREDEFINED 0 -/* - * Same values as TEE_LOGIN_* from TEE Internal API - */ -#define OPTEE_MSG_LOGIN_PUBLIC 0x00000000 -#define OPTEE_MSG_LOGIN_USER 0x00000001 -#define OPTEE_MSG_LOGIN_GROUP 0x00000002 -#define OPTEE_MSG_LOGIN_APPLICATION 0x00000004 -#define OPTEE_MSG_LOGIN_APPLICATION_USER 0x00000005 -#define OPTEE_MSG_LOGIN_APPLICATION_GROUP 0x00000006 - /* * Page size used in non-contiguous buffer entries */ @@ -279,7 +269,7 @@ struct optee_msg_arg { * parameters to pass the following information: * param[0].u.value.a-b uuid of Trusted Application * param[1].u.value.a-b uuid of Client - * param[1].u.value.c Login class of client OPTEE_MSG_LOGIN_* + * param[1].u.value.c Login class of client TEE_LOGIN_* * * OPTEE_MSG_CMD_INVOKE_COMMAND invokes a command a previously opened * session to a Trusted Application. struct optee_msg_arg::func is Trusted