Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp195568imj; Wed, 13 Feb 2019 06:55:08 -0800 (PST) X-Google-Smtp-Source: AHgI3IaOINfa0N2uUwryZK5b6Wi63yvLlux4JeCoMJ6vqR6dorxoUg3NuKlKSaEFoR0cgNDtppCV X-Received: by 2002:a65:6099:: with SMTP id t25mr820497pgu.448.1550069708837; Wed, 13 Feb 2019 06:55:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550069708; cv=none; d=google.com; s=arc-20160816; b=nqX4mRkA/jXVHUsOYHFWmVXv+OaMZZBCK5PgX0BF/9fEnpVLB4l4BZUoXeq5/tksBn IdWBZPinsTM7F2UA96vUkTl7fEOshBTfIMuibiFJ5LDwT0IYju7KlvhWecIeIcqsRmh8 0P9oxjQ6a8OZYsrvHZi2P8l6L/6j7UVUCyTuSoMujfFWG41PENUHktoCog6ZXw0RX0bV NRxIivcv/m8igzhge+9VYO21OtmTS2CASSejOP/Ew2xTvZi0LF9zH3qx0XVwdmOc01+j Yb5ssx0wxWJc9JfQw596gVq2EdoAzmt7inlarbwn0rMf6Tc1RZhlwS3r50iIpwKpVITf JPdA== 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=n+xpNGTBUJTFj8aS5gzxBxlHPbKgKMsr1yQqNDU1whc=; b=NvCAXiUtABLg7M9oK9jBEpYbKGm7b+Vn9NrkmYuDQGjUaSUCnY9/zxtKeqAM2qJKce ZYfBQCsvfam0K00Aw/w4HmVYtvsR47DX+LAL5YEBu8eCg3Uv445pqau2PZaPOV5J5Tgt ouAp5s25LSn+aBOVINhiaUQqkop/g+5gF1WotYvr4oyjLXm+c11P9GMOkFOzJ2MXz4uJ P8i6egsHg7mACZ7T3PtdjDBXYGkNbPX2dbQfsmi66/Xg/dKVSQlQP7p/WX+9Cuv6Vp/S nJbHAL05YtldSR8pd2OSa7FZlW0KMshw2s7yJL9ao5w6Z+BQ1JxyBE94pWtxL2yB4pqj cCiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="w08p/rIs"; 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 i30si15360715pgm.76.2019.02.13.06.54.51; Wed, 13 Feb 2019 06:55:08 -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="w08p/rIs"; 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 S1733101AbfBMNgx (ORCPT + 99 others); Wed, 13 Feb 2019 08:36:53 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:46795 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726143AbfBMNgx (ORCPT ); Wed, 13 Feb 2019 08:36:53 -0500 Received: by mail-pl1-f194.google.com with SMTP id o6so1162546pls.13 for ; Wed, 13 Feb 2019 05:36:52 -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=n+xpNGTBUJTFj8aS5gzxBxlHPbKgKMsr1yQqNDU1whc=; b=w08p/rIs9IF9WB9OMf1R+mbyfgQQ07QA0Mh3F/Bp3fkWGWogWT8m5VRfhAhCgxE+wQ R/vDF/V/uuSEp8+pdfGIQwH2Mr1aOP1goyVAStNFMtXPnv0lv86/0w4bRbC3rfXp3306 5pmO/xJHhMrApVHevvqJKz0HPgw+06K9dZWHDKYvkV+kpcEayGbvctt7qmPnqyfHQ4Hv 3nul8BSsBy2H5EQk8bNJ58J9AcL55r8WmnKVUn551RGLBa9QRQD7Q1bduHoRXPkN7gMj 9B8qzWVtvbXhdznLM4iAs9ieH5WwdR6WPI/TJxOV5vrZmLAC55/qmRsEK47l1MszcpdA OEIQ== 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=n+xpNGTBUJTFj8aS5gzxBxlHPbKgKMsr1yQqNDU1whc=; b=LqOHzZFgqTo1YY23VVTGdu7N9Asbl73rO5bNQ9qUw6vseFYzu9Mr2Yu+pH+qyEALUx Waqaof0RcYr1SqIxA6sv3p7HRPmfUf0701SAf6Kvks0HPkAXgiyo51y5qXCDOLiBIf9a YQleHef3jrBv+1EHWnlarfhkwpoT3JPz1G4TiFznW19pp5T7VVTXNpiKa52M385ENt3T rnL4QBC9K8dGhHTMniSL+RJoD3foKFoJvV9pLaWfP3sC4UzWCpruwBSna5FnmipWTbM+ nQ9KQQxfhAv4GZ+29gFagSXe7lHIhEqxCy/m4rjKuv/XIUeQu2DjYaxemhM/+4dbnOwR 1pnA== X-Gm-Message-State: AHQUAua8+F90hYF5z78axmFOX9g1DGr0K9CfDkP0uuJLURPw1Nl5lFCc XpsRH3hjunlzlTBH1TYKwLr9S4M0/R9b4l8ydK4vqJ4iaG4= X-Received: by 2002:a17:902:690c:: with SMTP id j12mr600056plk.206.1550065012184; Wed, 13 Feb 2019 05:36:52 -0800 (PST) MIME-Version: 1.0 References: <1548351151-3722-1-git-send-email-igor.opaniuk@linaro.org> In-Reply-To: <1548351151-3722-1-git-send-email-igor.opaniuk@linaro.org> From: Igor Opaniuk Date: Wed, 13 Feb 2019 15:36:16 +0200 Message-ID: Subject: Re: [PATCH v2 1/1] tee: add cancellation support to client interface To: Linux Kernel Mailing List , Linux ARM , tee-dev@lists.linaro.org, Jens Wiklander Cc: 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 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. Thanks! -- Regards, Igor Opaniuk