From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751821AbdAWXUQ (ORCPT ); Mon, 23 Jan 2017 18:20:16 -0500 Received: from bedivere.hansenpartnership.com ([66.63.167.143]:54456 "EHLO bedivere.hansenpartnership.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750709AbdAWXUP (ORCPT ); Mon, 23 Jan 2017 18:20:15 -0500 Message-ID: <1485213612.2534.45.camel@HansenPartnership.com> Subject: Re: [tpmdd-devel] [PATCH RFC v4 4/5] tpm: split out tpm-dev.c into tpm-dev.c and tpm-common-dev.c From: James Bottomley To: Jason Gunthorpe Cc: linux-security-module@vger.kernel.org, tpmdd-devel@lists.sourceforge.net, open list Date: Mon, 23 Jan 2017 15:20:12 -0800 In-Reply-To: <20170123230433.GC21744@obsidianresearch.com> References: <20170122234438.12102-1-jarkko.sakkinen@linux.intel.com> <20170122234438.12102-5-jarkko.sakkinen@linux.intel.com> <20170123164754.GA29360@obsidianresearch.com> <1485210503.2534.32.camel@HansenPartnership.com> <20170123224952.GA21744@obsidianresearch.com> <1485212231.2534.35.camel@HansenPartnership.com> <20170123230433.GC21744@obsidianresearch.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.16.5 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2017-01-23 at 16:04 -0700, Jason Gunthorpe wrote: > On Mon, Jan 23, 2017 at 02:57:11PM -0800, James Bottomley wrote: > > On Mon, 2017-01-23 at 15:49 -0700, Jason Gunthorpe wrote: > > > On Mon, Jan 23, 2017 at 02:28:23PM -0800, James Bottomley wrote: > > > > On Mon, 2017-01-23 at 09:47 -0700, Jason Gunthorpe wrote: > > > > > On Mon, Jan 23, 2017 at 01:44:32AM +0200, Jarkko Sakkinen > > > > > wrote: > > > > > > From: James Bottomley < > > > > > > James.Bottomley@HansenPartnership.com> > > > > > > > > > > > > Signed-off-by: James Bottomley > > > > > > > > > > > > > > > > I really think we should not use the ugly read/write > > > > > interface for any new things. > > > > > > > > The R/W interface is needed for backward compat, > > > > > > With what? This is a new cdev with different semantics. > > > > If you set TPM_DEVICE=/dev/tpms0 the old software just works. If > > we remove the R/W interface, nothing will work. The point being > > the new cdev has the same interface semantics, it just has > > different global behavour. > > So you are saying there is so much already deployed TPM2 software > that has this TPM_DEVICE env var convention that we need to support > it with compat? > > I'm really surprised by that.. But OK. > > Can you at least remove the 'user_read_timer' junk from the new cdev? What's the problem with it? Can we not just fix whatever the issue is? I'd rather reuse all the R/W machinery as is. If I start trying to special case it so that we only use some parts on some control flows, the chances are I'll introduce additional bugs as well. James