Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1791843ybz; Thu, 30 Apr 2020 05:41:32 -0700 (PDT) X-Google-Smtp-Source: APiQypICyzBRzlfAHOb80a9cs9bnTQcCnykeeP9BlpyZWhpTeybZGvmayA3VCAsiMqqqsaU1DrO2 X-Received: by 2002:a50:9dc9:: with SMTP id l9mr2487736edk.39.1588250491944; Thu, 30 Apr 2020 05:41:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588250491; cv=none; d=google.com; s=arc-20160816; b=Odzy7twL13qwHaYi6AzjzqJ+r8gG4KwY5UDbFcrS4uWVmNnCaRPMvQUBqthUowZv0j sts8Ckh6neM+DQIzgbeCkzDpzJItuYBjAu0EyA4XcyKpQRQz8cslNl9sSpkvH6zb19Wd F+KEnL84TA+y3u/OSmAgDR3Varl3+1NdUoBZt30YcAH5zRWURCwVrua4wBKHNGf7nRv3 nPle8AlZPGi3OXc5LKW+y8iIbhkY3X/8ijuav2dUA4/q8WMT2cRu2TmOGd7qXLCVxKtK ZENNdykIw+oNWzAwXh7ZPnjRxlQc8OaeksxFag9wN6173v1LYjg00jbp42FKgfXvQMfA b2aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr; bh=OQfvoMrRuKFfne/IwfOxqEIwkM2AqBqtnKqYEeUiT7U=; b=ucRQDi48Qxk7l4Yl7KKVSIy2YfXYZ4Av+MgReL4uycCDyXMFGeMCpEq3bHsH+LLNGQ sEm+cTJYoq+bvmAGPSiOCFMgxTnIniR1ocxRt/TBS677P8C8AtdHd9/6PeJL1ikj4IQY O8qLwU83Ga+EChQiem+IRT7N+tKiQjFLhtiwCAMauWNv1auEwyIj0phB7lvgODJP/l7/ +yXNHYEJBfmAYgJW9znJLDfykXP4MPpXo9TxXzTyUMLpNtWRWM10Ncqa8egXp+7BC4PS gsYU8S0EtnnTWjF7/G0z/wTolA5ABrtilY0UxrPqOJVOjzBSCbtKiv66AxaXEDMWc5F3 Ul1Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id di18si5037684edb.471.2020.04.30.05.41.08; Thu, 30 Apr 2020 05:41:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726885AbgD3Mhb (ORCPT + 99 others); Thu, 30 Apr 2020 08:37:31 -0400 Received: from hel-mailgw-01.vaisala.com ([193.143.230.17]:46709 "EHLO hel-mailgw-01.vaisala.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726837AbgD3Mha (ORCPT ); Thu, 30 Apr 2020 08:37:30 -0400 IronPort-SDR: RjH9kWxykJsDNSrK6BXPYcjG94sZwGo5oCJppMqZncR54ZJ/ffl0WfqTkp3YP9uC6fNSKbFmif kD92gjGN9V7pzHhAx7EL10dbfSBRT2kJMaAM02jVPyVHuXiMsTOiB8noyspxudaakuqvu3wVpW ko37AZMKp5O3zycGGgaSv6rD1aVikhrMy1JAVxc1ubwhaOL6/TFyYB+HTG20Yil6tpymlo5afN pBRRW77PsLkxZsIKpz1T0nkL/r/+XXcpVszcHjZGpHh3S3hTEce0SfC+pzd08IooTx6q4vbprg O48= X-IronPort-AV: E=Sophos;i="5.73,334,1583186400"; d="scan'208";a="278151916" From: =?UTF-8?q?Vesa=20J=C3=A4=C3=A4skel=C3=A4inen?= To: op-tee@lists.trustedfirmware.org, Jens Wiklander Cc: Rijo Thomas , Herbert Xu , Dan Carpenter , Devaraj Rangasamy , Hongbo Yao , Colin Ian King , linux-kernel@vger.kernel.org, =?UTF-8?q?Vesa=20J=C3=A4=C3=A4skel=C3=A4inen?= Subject: [PATCH v2 2/3] tee: optee: Add support for session login client UUID generation Date: Thu, 30 Apr 2020 15:37:10 +0300 Message-Id: <20200430123711.20083-3-vesa.jaaskelainen@vaisala.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200430123711.20083-1-vesa.jaaskelainen@vaisala.com> References: <20200430123711.20083-1-vesa.jaaskelainen@vaisala.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-OriginalArrivalTime: 30 Apr 2020 12:37:21.0583 (UTC) FILETIME=[17E24BF0:01D61EEC] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Adds support for client UUID generation for OP-TEE. For group based session logins membership is verified. Signed-off-by: Vesa Jääskeläinen --- drivers/tee/optee/call.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/tee/optee/call.c b/drivers/tee/optee/call.c index cf2367ba08d6..dbed3f480dc0 100644 --- a/drivers/tee/optee/call.c +++ b/drivers/tee/optee/call.c @@ -233,9 +233,13 @@ int optee_open_session(struct tee_context *ctx, msg_arg->params[1].attr = OPTEE_MSG_ATTR_TYPE_VALUE_INPUT | OPTEE_MSG_ATTR_META; memcpy(&msg_arg->params[0].u.value, arg->uuid, sizeof(arg->uuid)); - memcpy(&msg_arg->params[1].u.value, arg->uuid, sizeof(arg->clnt_uuid)); msg_arg->params[1].u.value.c = arg->clnt_login; + rc = tee_session_calc_client_uuid((uuid_t *)&msg_arg->params[1].u.value, + arg->clnt_login, arg->clnt_uuid); + if (rc) + goto out; + rc = optee_to_msg_param(msg_arg->params + 2, arg->num_params, param); if (rc) goto out; -- 2.17.1