Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp379209imu; Fri, 11 Jan 2019 02:00:12 -0800 (PST) X-Google-Smtp-Source: ALg8bN4fajOURs55O7F9gg34/isLDzrLd9opqgqt6Mvt7Qcjeloo8bmR2J6p/hEBEF8k8RHJrvjB X-Received: by 2002:a62:d448:: with SMTP id u8mr13832356pfl.105.1547200812200; Fri, 11 Jan 2019 02:00:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547200812; cv=none; d=google.com; s=arc-20160816; b=Gl2a9wbaErxXDPYbDJXUPHLXipGYPgzYgXhCiUcFcmLw2QHA9ug/GUZDcXK2kevp8n Qu4WntwVfJqSBDKsKT+8wrGg3PEbKps0xBnJDCkBWBuSBt45qqjQ2qmPaMLF2nNk6TXw 7MHlHlturELfrICFQGrouxH0sg4RAybKOghTYqpdSgepNM3kchkZ53LhEQrcFf3bdc9s Iv+p+O/EmqjI1HTOGTuJnL7pV2NF3FDH0Lf6pbhaAU6eH7XoT9+BAUD3EBt9XGp93I+3 EC5hyi61Ddej9+uVdW7CyH5w2wlYszMvNfvUg17ZxvzkICpGV/wkLrRoCwAO543ywIIi 77Mw== 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=hdxivZjww+kdiSrhuzC1PWn78pP7JY13s0K0FNua8kQ=; b=GiN2kPvTLtHU9E2E6VgpL0d6g6Pm6TbBwRqj7SGdnesJeWeIN3bmx4cbof3VAPZbMs lJA4Sf/Qk/MwVl0Rtyk/5N/7Rew+CSxbB455yjaFSmoL33GGm1m7n6GZQZLyFR/2ewMM qQaNbuIT0vEn0u+3iyHiqJdDbgGMLSk030D3zSuqWUgpXGi9icuJ1KMsYGe3w374/mEk Ny+bDnHgzN1cIoFxQTFpteD/jcEr1QFDgNeAn7oXRTU/LXlm5Jg3oHWAoTOxIZN8u5q3 pr8iMYDhs2mWeJNzxNocu8Hpj5gEexB49AcaXBKViFD++o0XjD1a6X+tjca6Hj88GCSc 6juA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QgSAZmqy; 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 r12si41074438plo.59.2019.01.11.01.59.56; Fri, 11 Jan 2019 02:00:12 -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=QgSAZmqy; 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 S1731351AbfAKJ5N (ORCPT + 99 others); Fri, 11 Jan 2019 04:57:13 -0500 Received: from mail-vs1-f68.google.com ([209.85.217.68]:42282 "EHLO mail-vs1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728042AbfAKJ5M (ORCPT ); Fri, 11 Jan 2019 04:57:12 -0500 Received: by mail-vs1-f68.google.com with SMTP id b74so8848806vsd.9 for ; Fri, 11 Jan 2019 01:57:11 -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=hdxivZjww+kdiSrhuzC1PWn78pP7JY13s0K0FNua8kQ=; b=QgSAZmqy+LoU5cca445Mn/9Qjb4V+2eRA4M90GScviuRacw1X5qVNSdDk12BEX48jj w97mbncn2bJOmB2FO/HI82hxjJ0sNIYDyqGD98Nu5lXttJNP1HO2MxAwAseEIYcePsWZ et/UJL8NdNyjaDaOWruepTft55hi/eDaF38PI= 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=hdxivZjww+kdiSrhuzC1PWn78pP7JY13s0K0FNua8kQ=; b=NaOoErshhpu6Bt/NWqDU6gc23aU7NvVSMPhuAGVhJowllUjgIk5FXvPYtPCgoNzlRl z9aWLYnj2cwMuLS5sc4lLcy+3zF3Y7LNXkBUIxTzbss07I3zA4uOfyhb1vSif9Ofc22E 8uHiBt77s4XJmN0rrrS7lnWk83TYU9yJXLr9bFprJeXgLlzIxi4fms6LX5UZeZ5Ca9Pt hIbcOnA7oochPpkNTLVHnaPNEgVQpjvCVCl2Dr44RQ5PQ/AEW1hWiXDU5ygZSLuZM7o+ MmKVZK+uAQWt6d6WM3F77Ko8wIOXm1Guc7WfTHIFZENZb+Da9lYODxt1iVJHvUfQmguq 1EFw== X-Gm-Message-State: AJcUukdOO49Ew8iFKj0U4O079wALmQl+pp7OA46qPl97SZIydb0RwddO 5mke3ODKAp1ci5cqhys8z6qgjNuWZMHyndMmg4lYwQ== X-Received: by 2002:a67:8cc2:: with SMTP id o185mr5575802vsd.55.1547200631444; 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.