Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1615466imj; Thu, 14 Feb 2019 09:12:00 -0800 (PST) X-Google-Smtp-Source: AHgI3Ibf78LUwB5+D/koVc4eo1hEC9TZ7KyuQwrKKtTSDfDjF8wI7qKgFJVguCzqcUBKpDE8sQsC X-Received: by 2002:a63:101:: with SMTP id 1mr864119pgb.152.1550164320673; Thu, 14 Feb 2019 09:12:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550164320; cv=none; d=google.com; s=arc-20160816; b=Cp0JsMbs0QdSplh58+H2YIklsPnx0Ze4x6Mh6180VuIrp9F9yPkg0XCw9I+HAMdHiE s0AapJ6tcPVFri18VgSp0lMyCwxzWNEypw7zg2zku7zSjgdM9v5UQYYdVEPHEfiJXt8l uKNniN//7UV1aAmjp6r3C+dHYx8ljX82V4ASzIbwA4Gj5Erct3KFVF8rUcH0GDSS860a UEEH3JQcOOiKTIU1I6VamCJI+crqYaz1LoD4iwos2PpVf3d0eBzXU3llxF3F1G45UKNF 98slG14ksEINRe/sIZE5VTbLg9aOYmCjuZNoA476zl0Txvv1zSH/cJSZp5bzkQ6DDz1H /fpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=4o4O471w38IxBKHrVNFNmKCWLwJS5aMAkZO3EUbBvAk=; b=b/wuKGFKfj4HZ6cepJRmEvQ01tQFPaFgbJ0Dhhnbfyo7fvY6k9d7+pCFIKnyCf3hj/ VxXrZefWL6+23cw1WxOrEUqm7oJp0JVTsj1jDEOKNSZxRKIVgzRRw4d43MityB9lYwm6 GzcAN9ESVY0RMXM5MGowBbNrKq031uGRUEeTFa1iFvnP+7KaRlaxMvPQZD7qWpWC1vM3 GsIOkmVf+yBimcTZXfbMGEolCQqYBDcCHgD25CmHEsFMEkwe9KfWWT5zgsMDMYrbuXns QUDBtb3jH3x8b1BvHQui8uXvxXgoTrjDC+wThqfjkZ/nIzCVvLZvPNEOFLaEcmHX3MW7 OuDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mATzvWDj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gn22si392785plb.19.2019.02.14.09.11.44; Thu, 14 Feb 2019 09:12:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mATzvWDj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389494AbfBNImp (ORCPT + 99 others); Thu, 14 Feb 2019 03:42:45 -0500 Received: from mail-it1-f194.google.com ([209.85.166.194]:35724 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387828AbfBNImp (ORCPT ); Thu, 14 Feb 2019 03:42:45 -0500 Received: by mail-it1-f194.google.com with SMTP id v72so12605644itc.0 for ; Thu, 14 Feb 2019 00:42:44 -0800 (PST) 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=4o4O471w38IxBKHrVNFNmKCWLwJS5aMAkZO3EUbBvAk=; b=mATzvWDjii6CKL6544UHpusry6fp3858YOPXhTT4wNZGt4nwJEkdDWp93yjRP0u6vg aaZ8EVuSyeGccoOL5yTw/D1W0V7Mr8EUqZW5unP1d93iDhyay+8zjFRoejykagkZ4hhX tBliAPCMoDvSzvdQJbPXuDXCeXXU/woKFZlDGeJlG7A6i2PUrqMGgORnMSP1t0zZDJLv b0eTiX+zGSa1Vn6OoR5E5bd+Isl5AL3i3Ae+LK0HZNIqJ3QOBPYAYIGle+F1jKSvWtIT YlIdFDk37HJ6i89us3EuQY4GCvij7fjMWodX7wk31KxldW67FGZv6SQJKlaMepyI3Vpl roRA== 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=4o4O471w38IxBKHrVNFNmKCWLwJS5aMAkZO3EUbBvAk=; b=JV1HKoglyEgfhZ5yN9Y4XVVZatyqpJ8F9M/V/BL9v8qaZRiyECvY0eqlG6tnAA+j8I Sv9h/L0njZ2oIJUQBHQMI9y/TG/eXRr8TNt+R+mNsKoqYXWr0f8w7lMcGLMqbKrERIfZ sAH/8YbMvlxBBNohfX8UgGB/dJt/gt3rtfx/6dly9btsY8tnRvJxHiR5KS9V9NAQOKvk vwY+cHHdSLnfU7bZhQLxXarq48V4+qlsH4usLe0Xi0gJGQGACPDSxukAB1O07aXjq8aT zB/Y2/niK02r12v2dwdBc0xMJs6V1ACM1gEbKmzlCtz9zumvXRDMp9UMk9Wg8jd9ocMR 2yPw== X-Gm-Message-State: AHQUAuaiVXVN4XBFr0YKgcBKkt6fJKqHhzd4YZx9tocd5hzASb9BgtGc oR+l5ovfSRLb4Z6lmES1lIuR7KSyFyD1E4FITKjMFw== X-Received: by 2002:a02:5782:: with SMTP id b2mr1418186jad.2.1550133764036; Thu, 14 Feb 2019 00:42:44 -0800 (PST) MIME-Version: 1.0 References: <1548351151-3722-1-git-send-email-igor.opaniuk@linaro.org> In-Reply-To: From: Jens Wiklander Date: Thu, 14 Feb 2019 09:42:33 +0100 Message-ID: Subject: Re: [PATCH v2 1/1] tee: add cancellation support to client interface To: Igor Opaniuk Cc: Linux Kernel Mailing List , Linux ARM , tee-dev@lists.linaro.org, Jerome Forissier , "Zengtao (B)" , Sumit Garg Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Igor, On Wed, Feb 13, 2019 at 2:36 PM Igor Opaniuk wrote: > > On Thu, 24 Jan 2019 at 19:32, Igor Opaniuk wrote: > > > > Add support of cancellation request to the TEE kernel internal > > client interface. Can be used by software TPM drivers, that leverage > > TEE under the hood (for instance TPM2.0 mobile profile), for requesting > > cancellation of time-consuming operations (RSA key-pair generation etc.). > > > > Signed-off-by: Igor Opaniuk > > --- > > > > v2: > > - use tee_ioctl_cancel_arg to provide session and cancel_id > > - fix tee_client_cancel_req function description header > > > > drivers/tee/tee_core.c | 10 ++++++++++ > > include/linux/tee_drv.h | 12 ++++++++++++ > > 2 files changed, 22 insertions(+) > > > > diff --git a/drivers/tee/tee_core.c b/drivers/tee/tee_core.c > > index 7b2bb4c..1148175 100644 > > --- a/drivers/tee/tee_core.c > > +++ b/drivers/tee/tee_core.c > > @@ -1027,6 +1027,16 @@ int tee_client_invoke_func(struct tee_context *ctx, > > } > > EXPORT_SYMBOL_GPL(tee_client_invoke_func); > > > > +int tee_client_cancel_req(struct tee_context *ctx, > > + struct tee_ioctl_cancel_arg *arg) > > +{ > > + if (!ctx->teedev->desc->ops->cancel_req) > > + return -EINVAL; > > + return ctx->teedev->desc->ops->cancel_req(ctx, arg->cancel_id, > > + arg->session); > > +} > > +EXPORT_SYMBOL_GPL(tee_client_cancel_req); > > + > > static int __init tee_init(void) > > { > > int rc; > > diff --git a/include/linux/tee_drv.h b/include/linux/tee_drv.h > > index 6cfe058..177016e 100644 > > --- a/include/linux/tee_drv.h > > +++ b/include/linux/tee_drv.h > > @@ -526,6 +526,18 @@ int tee_client_invoke_func(struct tee_context *ctx, > > struct tee_ioctl_invoke_arg *arg, > > struct tee_param *param); > > > > +/** > > + * tee_client_cancel_req() - Request cancellation of the previous open-session > > + * or invoke-command operations in a Trusted Application > > + * @ctx: TEE Context > > + * @arg: Cancellation arguments, see description of > > + * struct tee_ioctl_cancel_arg > > + * > > + * Returns < 0 on error else 0 if the cancellation was successfully requested. > > + */ > > +int tee_client_cancel_req(struct tee_context *ctx, > > + struct tee_ioctl_cancel_arg *arg); > > + > > static inline bool tee_param_is_memref(struct tee_param *param) > > { > > switch (param->attr & TEE_IOCTL_PARAM_ATTR_TYPE_MASK) { > > -- > > 2.7.4 > > > Hi, > > Just gentle reminder - v2 patch has been sitting in ML for almost 2 > weeks with no review (all issues mentioned in v1 were addressed). > If anyone has any objections/suggestions, please let me know. Looks good. I'll pick it up. Thanks, Jens