Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4132923yba; Wed, 17 Apr 2019 05:25:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqzYi/WrFSQuiiwQ8u4nymdxRzeuRSaRn+tmYfg24Hv2k3e9mPh29tvtgo19FPF0JZaExiSr X-Received: by 2002:a62:5707:: with SMTP id l7mr60725905pfb.205.1555503901193; Wed, 17 Apr 2019 05:25:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555503901; cv=none; d=google.com; s=arc-20160816; b=jwsvcFLGSTCA9TzUiLOBC8Vxs3CVxXgXAk7pU7i0RKy4AdTFoFz1gHWKW2pqFHZQMo Lsac/mfoeZhzek6jYEsMg7r4gnP2n8y6q+ekPRqp04LrW/7CvbGv2KB2qrp7FYsUW85n 01raE8HmH0UB70WRp0CFlsPXc/ZwVEuLnCVZWLjnPvWADLPYt0gVE7bl5wrnGcEoH/tB 52hM1CdiR33iijv5+v0UJs6ArYm+Gh4YDzOODOs147Tatb6FddDTyJDtMbHPOi9r/goM hXAAQvgwZmW2EtKlP/NcIeAnVX4SpgwoUbFJcTJLT0BSUOvtER47Uv0zzGSxiP1ksEHZ FLIg== 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:organization:from:references:cc:to:subject; bh=nKz45TIIL0pMB504BITZMxLBSTnxLxy6FoAWD5nABv0=; b=hTVpOgzkpMDS2gCkVnC5qwq64McWj09pO3SOU5yLS+bz0u8x67JpP7RMOPGSptSvEf 9aY7TQUTdPH72uKDXRe54voPdD6NZ00oq94hOB6InvH7gLPOObv+ZRdu6UQa4xutjYxL E+P5wz2Fg+4Vfdk5dTt4aJLph/sH0Mmfn7C0vGzHIvkmIM/vnapRm7chZHvbApAMvrw/ SJbGjFb1Jr9orOwn7q/sUXdEpzPtzM+Sm5wYMzQaBFaUGthKsScxH3tdjaxZiRxXVmzP a5fbRPSX7fli+oSsfVD/enF0wsi7dsqFpQ8i4Oemua9lGy1qTUxDdX1VyOyATfc4oxOS ZXeQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e184si44509348pfe.118.2019.04.17.05.24.45; Wed, 17 Apr 2019 05:25:01 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732081AbfDQMXa (ORCPT + 99 others); Wed, 17 Apr 2019 08:23:30 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:38965 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731824AbfDQMXa (ORCPT ); Wed, 17 Apr 2019 08:23:30 -0400 Received: from [192.168.1.110] ([95.117.89.119]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1N6KQZ-1go4on3fIH-016deW; Wed, 17 Apr 2019 14:23:16 +0200 Subject: Re: [PATCH v3 2/2] ftpm: add documentation for ftpm driver To: Sasha Levin , peterhuewe@gmx.de, jarkko.sakkinen@linux.intel.com, jgg@ziepe.ca Cc: corbet@lwn.net, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-integrity@vger.kernel.org, linux-kernel@microsoft.com, thiruan@microsoft.com, bryankel@microsoft.com References: <20190415155636.32748-1-sashal@kernel.org> <20190415155636.32748-3-sashal@kernel.org> From: "Enrico Weigelt, metux IT consult" Organization: metux IT consult Message-ID: Date: Wed, 17 Apr 2019 14:23:13 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20190415155636.32748-3-sashal@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:Q4mIZ6PRvzl7CkhdTRWxQzpE0Qr0lw8fOeV0IjANte9Nu5XLEWc YDX1j11hPb+OKuezAvoRxufl6jGpJ7y7C/pA7Uc+HXVk3kHZRj2ghiF4SgrFm0GUdtBXP28 9Vmzz7AG59VDDWnp8kmnXfX45nnC6atxKRGAJi2c5T4NP/dIdySpC28it/LNARuL3qDG+IZ iubXd81kavOmR7Xl1F2PA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:htORYJ9y9YU=:sAjJigSH1/tKTvt7wkyqHE DhIN5XvSEprfRjbBH8QtS4FPXrPcf59mcTXQmkYODWAkJCOZZXgYvaxdYASDNuyqSM5u4LB7R +EEn3UpCn9vx+bCVkU6U/ZwXCfXIVbqfHC7IQ+ZEVqxVOFQzRtdDYD+nNqpD+aMcNVEKfIu88 8JX1fzzLkH5TGpVk8Dal1AYKDWviTsClbawd7Mf/1Pb/tsSgFfN+pa1Y0mA5FPgEzijDc9Q6O QD1Y8xxbkiK6re1ki779WG2YYf0GSsdCP+Zp5aCmoadGFK3SAc3rdlctXXcautqkIU4lBXJkt ZcLc4M08XmlJJ6ciN2lxwiBWgnaZwnobIkqS3bpcmoR/xca88jVe74E0yHQBMOuRermFUxXdp YV1TlfpDJjvy6Lfk96xqzec9r61+aYVQFUT/9F/BNg0G9feHmgBY9JcCCvqoSOqL8/eljKeav cfqBbYOYDNtU0T6sMEwDaIeiULaD+LcozXZBntbtpjylKS/mz5pux65dy6fgEFKgVl/MPDJ83 jerJHR8c8HFK51d2PtJVYYIhadxZWQGVRcgw1WOkE0kWK+++25akfbfcYdFzuwYKbyBHAZESa 92MuQe7Hx1yw44nEQDZxlRwTX8F6dFeCgrRC6QA+m63+tU1+hrAljuWKtMFoN26SVRrq/dGam m7nIrFyOOHnqwHPWYs4j/dU2j+H4UDVXNgJyoKZDoPRrUh7ukruB6s4v9Hjpcq3VR9tNgYxwR 6R6MDyrkK1rktH1Mvh4Ru4v/HP5WoIrNlJtHrciNb/sd4YKi7TRj53i9wrI= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15.04.19 17:56, Sasha Levin wrote: Hi, > +The driver acts as a thin layer that passes commands to and from a TPM> +implemented in firmware. The driver itself doesn't contain much logic and is> +used more like a dumb pipe between firmware and kernel/userspace. Is that TPM already used in production or yet an PoC ? IOW: can the protocol be changed ? If so, I'd prefer using 9P for that. This already proven well, not just for grid computing (where it originally came from), but also in things like virtio, etc. In general, many of the hardware/chip interfaces out there basically deal with either either passing around some data packets or streams, or reading/setting some attributes. But everybody seems to do that part in his own special way - that takes up a big share of the driver development resources and final code - and that needs to be repeated for each OS. In many, many cases a standard protocol like 9P could already provide this - if folks would just use it :p Therefore, I'm really a strong supporter of the idea of using 9P for this. In your case, you could design the highlevel TPM interface like with a tcp stream / socket or a synthetic filesystem, and for the lowlevel part just like kvm does w/ virtio. In case you have no experience w/ 9P+friends, feel free to ask, I'll to my best to explain it :) --mtx -- Enrico Weigelt, metux IT consult Free software and Linux embedded engineering info@metux.net -- +49-151-27565287