Re: [PATCH] TPM: Let the tpm char device be openable multiple times

2012-10-15 Thread Kent Yoder
> 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. I'm trying to imagine when spinning would be unacceptable? Keygen could take several seconds, regard

Re: [tpmdd-devel] [PATCH] TPM: Let the tpm char device be openable multiple times

2012-10-15 Thread Jason Gunthorpe
On Mon, Oct 15, 2012 at 05:49:22PM +0100, Alan Cox wrote: > > > > 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 wr

Re: [tpmdd-devel] [PATCH] TPM: Let the tpm char device be openable multiple times

2012-10-15 Thread Alan Cox
On Mon, 15 Oct 2012 10:39:45 -0600 Jason Gunthorpe wrote: > On Mon, Oct 15, 2012 at 08:35:09AM +, peter.hu...@infineon.com wrote: > > > From: Jason Gunthorpe [mailto:jguntho...@obsidianresearch.com] > > > > > Using open/close is an interesting idea, but it wouldn't work. open() > > > is cod

Re: [tpmdd-devel] [PATCH] TPM: Let the tpm char device be openable multiple times

2012-10-15 Thread Jason Gunthorpe
On Mon, Oct 15, 2012 at 08:35:09AM +, peter.hu...@infineon.com wrote: > > From: Jason Gunthorpe [mailto:jguntho...@obsidianresearch.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 > > blo

RE: [tpmdd-devel] [PATCH] TPM: Let the tpm char device be openable multiple times

2012-10-15 Thread Peter.Huewe
-Original Message- > From: Jason Gunthorpe [mailto:jguntho...@obsidianresearch.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, may

Re: [PATCH] TPM: Let the tpm char device be openable multiple times

2012-10-12 Thread Jason Gunthorpe
On Wed, Oct 10, 2012 at 11:33:24AM -0500, Kent Yoder wrote: > On Sun, Sep 30, 2012 at 05:33:45PM -0600, Jason Gunthorpe wrote: > > How to use the TPM is really a user space policy choice, if the > > environment wants to use middleware then fine, but it is possible to > > make correct TPM apps witho

Re: [PATCH] TPM: Let the tpm char device be openable multiple times

2012-10-10 Thread Kent Yoder
On Sun, Sep 30, 2012 at 05:33:45PM -0600, Jason Gunthorpe wrote: > How to use the TPM is really a user space policy choice, if the > environment wants to use middleware then fine, but it is possible to > make correct TPM apps without using middleware. I'm not sure how I feel about this. The sing

Re: [tpmdd-devel] [PATCH] TPM: Let the tpm char device be openable multiple times

2012-10-01 Thread Jason Gunthorpe
On Mon, Oct 01, 2012 at 09:07:11AM +, peter.hu...@infineon.com wrote: > Hi Jason, > > one quick question: > - TPM_BUFSIZE = 4096, > [...] > + u8 data_bufferx[2048]; > > Why do you half the buffer size? I missed 7f366784f5c2b8fc065 when I rebased the patch, thanks! Jason -- To unsubs

RE: [tpmdd-devel] [PATCH] TPM: Let the tpm char device be openable multiple times

2012-10-01 Thread Peter.Huewe
Hi Jason, one quick question: - TPM_BUFSIZE = 4096, [...] + u8 data_bufferx[2048]; Why do you half the buffer size? Thanks, Peter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at h

[PATCH] TPM: Let the tpm char device be openable multiple times

2012-09-30 Thread Jason Gunthorpe
How to use the TPM is really a user space policy choice, if the environment wants to use middleware then fine, but it is possible to make correct TPM apps without using middleware. So, remove the kernel restriction that only one process may open the TPM. - TPM low level functions (in kernel users)