Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp2247052imm; Thu, 21 Jun 2018 09:21:41 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLjtXvVMzOjRSPpAFD+UMkvHF79CVfuPyyWLNHAdtvUb13jgeYd1bf0CkHXjVPNynrDHLhI X-Received: by 2002:a62:642:: with SMTP id 63-v6mr28318436pfg.222.1529598101243; Thu, 21 Jun 2018 09:21:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529598101; cv=none; d=google.com; s=arc-20160816; b=xV6mifq8CC3WKvwk+bd2WDNAugoy/68l9MgAosWPf2hfH6KQ1BUshsdIS2ssCBug+p 6KbJICvmgbi9KY5ZTLSn3v4ZQ88txMdqDAEDsnZFu25Y/L/Fei2DSsLXuQoLoAJfTTXg Ab+R6P16l2Njm89AruIMiO7rRV5CwA2Q2cquRiEQ25XlZlfAZKaDdYG0bTa4Xq4pIG9s rcVUjweClk5HhbY4sWVkxlvr6VbHKdALeom1+OOX1O6+QFapRQwbpIVGPlERwsnwo7Px Vf3ZH9IL+Ku5bPQL+IVI+ompv6BOqT4WYovOrYU9Swn1jz3v6kanJ3mpQAwLyCyENzxK nEPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject :arc-authentication-results; bh=L2+ssAkzfbkWwZFAFcp2JEOWUWbnI0VdroM6z7tO6pg=; b=cx928n5WpnGClzGRfCi09tKdZJYThIJ44MOZhMQRQKbN172iVh/RvQwrpljmk/U3Ia sN3M4+IT8J3yYeY5FdJ2u+hgMkuAuW6H3u8unFYKsS090ujCbDHxgyGpBGhGbhSsnVPc /shfeJOqBw9NYsg0MiYBqy5peeZQEbxV1KYTUzYTEv3UaOfrl5URDpQwtWGXCs127JWw ZvUzBvbzCRwSL+2R5kT153qRA4Au3VCTC7FX26En0Ls9jHwGlOAClSx9cvZDdqyMi07m 56Kk9GZhMnwnuepNCLVJ/0nsnhHg/e75eCstZyF/J1qKa9OPSYxmlOrEHXw/81kz9a+8 Wadg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p88-v6si5135007pfj.294.2018.06.21.09.21.26; Thu, 21 Jun 2018 09:21:41 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933421AbeFUQUl (ORCPT + 99 others); Thu, 21 Jun 2018 12:20:41 -0400 Received: from mga18.intel.com ([134.134.136.126]:27336 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933287AbeFUQUj (ORCPT ); Thu, 21 Jun 2018 12:20:39 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Jun 2018 09:20:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,252,1526367600"; d="scan'208";a="234481306" Received: from unknown (HELO tstruk-mobl1.jf.intel.com) ([10.7.196.162]) by orsmga005.jf.intel.com with ESMTP; 21 Jun 2018 09:20:38 -0700 Subject: Re: [PATCH v3 0/2] tpm: add support for nonblocking operation To: James Bottomley , Tadeusz Struk , Jarkko Sakkinen Cc: jgg@ziepe.ca, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, philip.b.tricca@intel.com, "Dock, Deneen T" References: <152882630662.30206.8805136953394285180.stgit@tstruk-mobl1.jf.intel.com> <20180619131046.GC5609@linux.intel.com> <1529539176.4163.2.camel@HansenPartnership.com> <0e46c2e9-af2b-550f-2b3d-98cbc1840bc1@gmail.com> <1529558767.3118.1.camel@HansenPartnership.com> From: Tadeusz Struk Openpgp: preference=signencrypt Autocrypt: addr=tadeusz.struk@intel.com; prefer-encrypt=mutual; keydata= xsDiBEiLICMRBADteQacQxypsuFvAw6IwYzbD8pgQi+kLYBcqfGgVAUN/cO+sLl6u1lVdaDB fhAArdbV9lpoqcWnmhQFTb4A+W569EpydBr6nuatWkEB+fmmx8YoUtuZfXt7v+1l1rc09kaW LY+TkwQkvFCeuvdasgmBLnmRWymEGWi1E12hUgTw/wCgtK24geC7XkiuANMv0gpr+raOgQMD /2yJZ0SeXQApWyTRaeIYN8GgYHZTWuBp/ofN+viEkhrDxahcaGPP5B/Nv6VS1+M0e5m8OzHj qPUbgfyOeJcslC5aoZdqqqzVWVLaA/+Jy+O+6T3k3R/IryVVATldBlwnGFDhET0mKQsd15zt cIdQBBbfSFR5VlugZuWV5q442IpPA/4g7nen9FFPxh45Te8D54hAsOCywjm6xUE0UJGYHeJ/ MXCPtuXfVCbYcOxZVH7kUS2Vtk5d3bF40IE2WnVq1ZScNANF4ZjikxYhYGfNWX3HXak1gSoj UrY87rMSjPIAry4L0BoIx2qgL/k4iV/3QcXL4t5wosU0iw++suf1zGGcKM0gVGFkZXVzeiBT dHJ1ayA8dHN0cnVrQGdtYWlsLmNvbT7CYwQTEQIAIwIbAwYLCQgHAwIEFQIIAwQWAgMBAh4B AheABQJQTjJTAhkBAAoJEDFswfskq9xyqvcAoI2nsaUCX8ZGbu+Jhq+++qlBFJ2rAJ983RoO R2ofHhn3g3Qi4K34tw0l087BTQRauzUlARAAqkWRL/InEPnoGMg/gw/CRaDBaIBgMsvIcghI 7xevIzpleXt6jKHghSBooH+zaT7qi4u2gkgPn4odsER3Rm94XgrZJgoqls6EpKMWpJNGP4HT eYgykhfsZOLX8ijUbjTM/Sm/dZVo6aYoBL2+ciJwyl+Zt3Mp6un3/GWu6cA9005V50pRqO7j PTlVCHi2bedcEEf5DDsYJv/3Oz8/4LpSf6BL6BltjeZVa2y03dTMmD031JTH+OuyJm1yh72Z HWxhlYNXOv6uFJJVr+paQjrAsBVIYKhK24bD+uGJxLm8AN9i7/Si+2YeSsXvKUhk9mIoFBnU VFo63cziRTcpRu/kXgDAbujwN88qytEcvhEZHS6B9vdws+lhTpolEjkLCkz0Y59z4Fs9srKy QkRN+wtdiLgrwyDW3ryAKxcDmOumGWebDxpaOI/pBhrlS93HmDlvj7JmgTUU4a/NhwI3dXh5 pn8FZzZyVXe3Kc3bu5T3UAC7uztinsAvCJQS6jGZWrXmXkqYkaLXQOw61eInWjr01zE/zDbE mdJPM0+va/gtZx9TtGxr4PpjbqswqCiubLDZXZHh5uqArPv/i+E8aXIsNSTN6Rrqs1j9YgDN ALksibv6+tXH3sOlCUgjuZgJH3+s/mnaAtiV2rZ/WlH15d6nd0uiDSZrKhlR+g4NHMh1ztEA EQEAAcJPBBgRAgAPBQJauzUlAhsMBQkJZgGAAAoJEDFswfskq9xyfv8AoI8aPrJCoM0h5WOP kKxMmPEPHzUNAJ9jBBYXhX1CWg+IhI7i/fLlI0vwCA== Message-ID: <279e1857-dbed-808d-0481-ced43f7fa64b@intel.com> Date: Thu, 21 Jun 2018 09:20:38 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <1529558767.3118.1.camel@HansenPartnership.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/20/2018 10:26 PM, James Bottomley wrote: >> Yes, it does polling: >> http://docs.libuv.org/en/v1.x/design.html#the-i-o-loop > But that's for networking. You'll be talking to the TPM RM over the > file descriptor so that follows the thread pool model in > > http://docs.libuv.org/en/v1.x/design.html#file-i-o > > This precisely describes the current file descriptor abstraction we'd > use for the TPM. That is for the file IO that doesn't support non-blocking, because there is no need for it as the operations are "fast". Operations on the TPM would fall under the io loop model. > >> Regardless of how it actually might be used, I'm happy that we agree >> on that this *is* the right thing to do. > I didn't say that. I think using a single worker thread queue is the > correct abstraction for the TPM. If there's a legacy use case for > poll(), I don't see why not since the code seems to be fairly small and > self contained, but I don't really see it as correct or necessary to do > it that way. This discussion starts to go around the circle. You don't agree, but you also don't disagree? Is this what you are saying? Thanks, -- Tadeusz