Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2101816imm; Thu, 19 Jul 2018 13:13:22 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcBUl+6RJpES8FJPGqbOZetLVol14eqq0/JyhnbplD/TX3s11pGLX+UOLUjXh5nNjh+uLLy X-Received: by 2002:a63:5fc1:: with SMTP id t184-v6mr10893959pgb.183.1532031202563; Thu, 19 Jul 2018 13:13:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532031202; cv=none; d=google.com; s=arc-20160816; b=ozh2gK5KeFNqkcQdaNWy3jJowtwedTOsaT8sFZQ0dQcIJZku4dHLn0etRp/rhDKR8T V2XBWveOFdWZ5RrI/8KLHRPm1fkbRYiTQQngVNWtzACpp0rCPToFD0eL4O/BpxRJ6JS6 r/lI8ZeK6R38ls6b/gB+TDssKeuG+Jn6opocSi6QW2HqD8kngSRDhphMUwgZwsaujLhk ffwRwmKydoPKRr9SmtKrSzU0n9o54z+IGMLzfqsoKwq9kaHZXN7qLj6kBt69dx4Km0gM xebjJkWf6MfXr/XKLjALxDFg+2m/2xKQ8EmUZrATs/8RvNc8o3OT9It9iabVxZc+n/s0 ZYSw== 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=Yieaw1ikCTT/kMITJq93lCviaJ2ZuZYgClkarachSKI=; b=EnHbCBdEUQVc4gfjg5WroDlgOsBtzGfHEnWcE/89Cd2QKH0Nf+3qAxYVueUANQyarv XOdG669rJDYUYMtK1r4Czg/wH9dvuIS5kmx5aDQRkWvshhxN8pTxL15pbNcF0AK6Egyz fbs/8VdQdSooU+15bRz809ytY4GfnuBNKOKrjKtFLWdETeOfzo+eKc942zk9WwtZV7Ke E4WZDCMyC9kyXs9DoXcI0+/gXDWh7iw7UeSjH17tv5iVoc3a7iGc4EHGuybQ2TjUPQXe tNI3tmCDi+jAGJi83ZBelEDigXOHmVGS4n5BV5heu3pf2967GEIRxvmtdBkduTvKv2MB h/qQ== 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 j10-v6si24087plg.396.2018.07.19.13.13.07; Thu, 19 Jul 2018 13:13:22 -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 S1728912AbeGSU5N (ORCPT + 99 others); Thu, 19 Jul 2018 16:57:13 -0400 Received: from mga01.intel.com ([192.55.52.88]:20659 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727555AbeGSU5N (ORCPT ); Thu, 19 Jul 2018 16:57:13 -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 fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jul 2018 13:12:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,375,1526367600"; d="scan'208";a="241675193" Received: from tstruk-mobl1.jf.intel.com ([10.7.196.153]) by orsmga005.jf.intel.com with ESMTP; 19 Jul 2018 13:12:19 -0700 Subject: Re: [PATCH] tpm: add support for partial reads To: James Bottomley , jarkko.sakkinen@linux.intel.com Cc: jgg@ziepe.ca, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org References: <153201555276.20155.1352499992826895966.stgit@tstruk-mobl1.jf.intel.com> <1532020750.5396.4.camel@HansenPartnership.com> <421c4b75-9e9d-7045-adad-797fd112898a@intel.com> <1532026030.3198.2.camel@HansenPartnership.com> <1532029979.3198.4.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: <0b9f0bb5-6620-0499-6680-5ec595167f23@intel.com> Date: Thu, 19 Jul 2018 13:12:19 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1532029979.3198.4.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 07/19/2018 12:52 PM, James Bottomley wrote: > The ABI break is the error case as I outlined above. We can't assume > everyone uses the current interface without getting an error and one > error and your hosed is a nasty failure case to change the interface > to. Well, if there is a broken application out there that doesn't work today it will not work after this change neither. > Plus, if you assume everyone is passing 4k buffers, why would you > even need the fragmentation case? So that people don't need to do this anymore and we can run a spec compliant TCTI on top of /dev/tpm. > >>> It might be possible to layer the behaviour you want compatibly >>> into the current device structure (say an ioctl to switch to the >>> fragment behaviour) but I've got to ask why we'd go to the >>> complexity without a use case? >> New IOCTL would add extra complexity, which isn't necessary. > So what's wrong with fragmenting in the layer above the device driver > (in userspace) and not actually changing the kernel? Because it is much easier to implement in the driver, and we can run a spec compliant TCTI on top of /dev/tpm. Thanks, -- Tadeusz