[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121015174922.31fbadd9@pyramind.ukuu.org.uk>
Date: Mon, 15 Oct 2012 17:49:22 +0100
From: Alan Cox <alan@...rguk.ukuu.org.uk>
To: Jason Gunthorpe <jgunthorpe@...idianresearch.com>
Cc: Peter.Huewe@...ineon.com, key@...ux.vnet.ibm.com,
tpmdd-devel@...ts.sourceforge.net, linux-kernel@...r.kernel.org
Subject: Re: [tpmdd-devel] [PATCH] TPM: Let the tpm char device be openable
multiple times
On Mon, 15 Oct 2012 10:39:45 -0600
Jason Gunthorpe <jgunthorpe@...idianresearch.com> wrote:
> On Mon, Oct 15, 2012 at 08:35:09AM +0000, Peter.Huewe@...ineon.com wrote:
> > > From: Jason Gunthorpe [mailto:jgunthorpe@...idianresearch.com]
> >
> > > Using open/close is an interesting idea, but it wouldn't work. open()
> > > is coded to return EBUSY if another process has it open, rather than
> > > block, and spinning on open would be unacceptable.
> >
> > Hmm, maybe write a small pass through program which opens /dev/tpm
> > once and accepts its data via a socket or pipe?
>
> I believe the kernel should not be enforcing this kind of policy into
> userspace. Plus, some of our embedded system are memory constrained
> so an unnecessary process is not welcome..
Sane device drivers for devices where contention is meaningful block on
an open that is busy, or return an error if the O_NONBLOCK option is
specified. That's the normal case.
Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists