Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp377127imu; Fri, 11 Jan 2019 01:57:31 -0800 (PST) X-Google-Smtp-Source: ALg8bN4zVrBUE9WJN7vAPLYHqvmutl8GiXQgwzugfzLvV6EcS5CnTwov8ioTA1SS9fNblRniMm6/ X-Received: by 2002:a17:902:bf03:: with SMTP id bi3mr14029130plb.83.1547200651651; Fri, 11 Jan 2019 01:57:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547200651; cv=none; d=google.com; s=arc-20160816; b=hn55eV5xuQcBQpMbwl2J10c0BM998hBd9sUlWIkeYqeZIhWGF5wexKa1dFm0eOG4H7 4ToTb6aQrTEDvvZ2gYUmt8++LID/kVmkEtvjkNtAVPGiHQSqClYISrfXj7gd4LO8I8A9 XVnw/S/wLyOdyNQd+C0b64deGC4xqOtAlVtIgD+KrkBYvVbL7gKvUF0XgsiIw8Y/PIO0 rmilsOCZI3hFD+zdQhBoj8PxTZSNfkxcNb3hp4flZzaEl2Wp9EEjSS9ZvooiYe5/Ied6 899ZCoX1AAdJogchZmZ4PskEe4XoJ++3eOIzap74KJEIYHIWedbgioSqz3UbuLj/EiWh 8/MQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=nkf9/5iA3E6KP4iOorpGJNEgxsrAnhqFpwiLvHdb7lg=; b=NsU+P96wWKVC8+89uyL9Eg5UmNgCuZ3cdcufObJNPdbGGcV8MYx1/3KmkyH7EBCpci vStbRY2cshOdRdaK0sVLVfHhj1B/tx4rta7R8R6FeIiCDSjCsS5dCQrc0vnmWF+9RtYV nF9CPLlxVLD1udOYfRoznssleKOwHpZ9pQX6/pRTEkRYVRyX9elYL2LpEMGAYyS/NS7X 6ArkJfgCqgh15btpha/wkwdAqKK/MeGG5iw6DqJhTspr6kiXdZhqV7ANXO6sjmEyQy+2 0DFENpe73zUKnukuQLEdSUUAh/RXxpx3/qKOdphhRxOT7ftzgqQtiR/dUuPBcLHs9Szg RO7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EIcnHl8J; 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 f4si49192062pfc.234.2019.01.11.01.57.13; Fri, 11 Jan 2019 01:57:31 -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=EIcnHl8J; 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 S1731556AbfAKJyT (ORCPT + 99 others); Fri, 11 Jan 2019 04:54:19 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:43937 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728616AbfAKJyT (ORCPT ); Fri, 11 Jan 2019 04:54:19 -0500 Received: by mail-wr1-f66.google.com with SMTP id r10so14459444wrs.10 for ; Fri, 11 Jan 2019 01:54:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=nkf9/5iA3E6KP4iOorpGJNEgxsrAnhqFpwiLvHdb7lg=; b=EIcnHl8JnL0fqQn6uGpdUkzn36mc3hQ2zifOp4JPzxmLwiO179GzbCLnpmHFcuHQ93 Om/0KyMNA3UA4rccGU96pgfJwY3lP8g4BK4p53L2e5+5zmNtLR1Rn34ZCdxEjcRW085h Di0rxMiUcUAbPXz5yYHlNdQWZSC7TWATRptao= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=nkf9/5iA3E6KP4iOorpGJNEgxsrAnhqFpwiLvHdb7lg=; b=sgtRguIJuOtlE0jzTQoBxToGH3jmG2oBu6pfBpyTrHLAGiIM0D2+6fYryz5WJ5QY+G NND85b1zEVx6kvpuZYUUqJkKMs9skX1Gg7U+EZDp9shABzFW9a676OdpHEDrd7QQGc5g 3LVQD0jN3EihMXAooEsLdtMaOGcUf6U+p0aCO88iMf9quMI9uaHwsM8Yj1qzpUOXkuCH YDnKYq0P2PsBVCxKeceaexJ+iK31xgPFiWrSbGcImeKA2pwB4zrb/nSOEs16HEQ7ZlFC VcWqCLruUIy9vV/JQbswmLh+F8GAr6U3cd65x67HtvHYKyL+YXD4sxZwYo81wxH7L8Qd svgA== X-Gm-Message-State: AJcUukdXJNI3qCa/RGn6irRU5Df8fui3+mOGvbVWQ+fuyMNAUJTMni1x VedA1xSreNl1tpUM5qePkEduTA== X-Received: by 2002:adf:b307:: with SMTP id j7mr13532668wrd.46.1547200457315; Fri, 11 Jan 2019 01:54:17 -0800 (PST) Received: from holly.lan (cpc141214-aztw34-2-0-cust773.18-1.cable.virginm.net. [86.9.19.6]) by smtp.gmail.com with ESMTPSA id f137sm18810289wmg.29.2019.01.11.01.54.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Jan 2019 01:54:16 -0800 (PST) Date: Fri, 11 Jan 2019 09:54:14 +0000 From: Daniel Thompson To: Sumit Garg 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 Subject: Re: [PATCH v2 3/4] tee: add supp_nowait flag in tee_context struct Message-ID: <20190111095414.nbnzbocdn32zypdc@holly.lan> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Daniel.