Return-Path: Received: from mail-vs1-f66.google.com ([209.85.217.66]:39353 "EHLO mail-vs1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729792AbfAKJ5M (ORCPT ); Fri, 11 Jan 2019 04:57:12 -0500 Received: by mail-vs1-f66.google.com with SMTP id h78so8856673vsi.6 for ; Fri, 11 Jan 2019 01:57:11 -0800 (PST) MIME-Version: 1.0 References: <1547123097-16431-1-git-send-email-sumit.garg@linaro.org> <1547123097-16431-4-git-send-email-sumit.garg@linaro.org> <20190110142355.bcgw62w2qk2mlzj6@holly.lan> <20190111095414.nbnzbocdn32zypdc@holly.lan> In-Reply-To: <20190111095414.nbnzbocdn32zypdc@holly.lan> From: Sumit Garg Date: Fri, 11 Jan 2019 15:27:00 +0530 Message-ID: Subject: Re: [PATCH v2 3/4] tee: add supp_nowait flag in tee_context struct To: Daniel Thompson Cc: linux-arm-kernel@lists.infradead.org, "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , linux-kernel@vger.kernel.org, Jens Wiklander , mpm@selenic.com, Herbert Xu , Rob Herring , Mark Rutland , Arnd Bergmann , Greg Kroah-Hartman , Ard Biesheuvel , Bhupesh Sharma , tee-dev@lists.linaro.org Content-Type: text/plain; charset="UTF-8" Sender: linux-crypto-owner@vger.kernel.org List-ID: On Fri, 11 Jan 2019 at 15:24, Daniel Thompson wrote: > > On Fri, Jan 11, 2019 at 01:00:49PM +0530, Sumit Garg wrote: > > On Thu, 10 Jan 2019 at 19:53, Daniel Thompson > > wrote: > > > > diff --git a/drivers/tee/tee_core.c b/drivers/tee/tee_core.c > > > > index 9ddb89e..5d6c317 100644 > > > > --- a/drivers/tee/tee_core.c > > > > +++ b/drivers/tee/tee_core.c > > > > @@ -105,6 +105,7 @@ static int tee_open(struct inode *inode, struct file *filp) > > > > if (IS_ERR(ctx)) > > > > return PTR_ERR(ctx); > > > > > > > > + ctx->supp_nowait = false; > > > > filp->private_data = ctx; > > > > return 0; > > > > } > > > > @@ -981,6 +982,7 @@ tee_client_open_context(struct tee_context *start, > > > > } while (IS_ERR(ctx) && PTR_ERR(ctx) != -ENOMEM); > > > > > > > > put_device(put_dev); > > > > + ctx->supp_nowait = true; > > > > > > Why automatically set supp_nowait inside open_context() ? > > > > > > > I think this is the default behaviour (non-blocking request) that any > > in kernel client would expect. Also this flag could be configured > > again before call to open_session() if any in kernel client requires > > different behaviour. > > Makes sense. I think this is a deep enough behaviour to warrant proper > commenting though. > Sure, will add comments. -Sumit > > Daniel.