From: Valdis.Kletnieks@vt.edu
To: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Cc: Hal Finney <hal.finney@gmail.com>,
tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org,
srajiv@linux.vnet.ibm.com
Subject: Re: [tpmdd-devel] [PATCH] TPM: Let the tpm char device be openable multiple times
Date: Tue, 03 Nov 2009 22:24:29 -0500 [thread overview]
Message-ID: <13189.1257305069@turing-police.cc.vt.edu> (raw)
In-Reply-To: Your message of "Tue, 03 Nov 2009 15:41:58 MST." <20091103224157.GA20963@obsidianresearch.com>
[-- Attachment #1: Type: text/plain, Size: 1359 bytes --]
On Tue, 03 Nov 2009 15:41:58 MST, Jason Gunthorpe said:
> On Tue, Nov 03, 2009 at 01:14:28PM -0500, Valdis.Kletnieks@vt.edu wrote:
> > On Tue, 03 Nov 2009 09:31:55 PST, Hal Finney said:
> > > What if you don't want it accessible by user mode apps, you only want
> > > your middleware (ie tcs daemon, tcsd) to open it? Will this still
> > > allow that to be enforced, so nobody can interfere with tcsd's
> > > exclusive access to the device?
> >
> > Couldn't tcsd just open the device with O_EXCL? Or am I missing something
> > subtle here?
>
> O_EXCL isn't a locking flag...
Sorry, getting over the flu, my brain isn't totally online yet. I was
thinking of TIOCEXCL which is (a) an ioctl() and (b) apparently tty-specific.
A number of other things under drivers/ implement "only one open" semantics,
but those are hard-coded into the driver. But for the TPM, it's unclear if
exclusive or non-exclusive is the right model. Maybe the right answer is to
default to multiple opens, but have an ioctl() that turns on exclusive mode.
If you have a 'tcsd' daemon, it will need to get launched early enough
to do the open/ioctl before somebody else gets running anyhow, so it's
not adding to any raciness. Yeah, it's a hack. And there's still a small
DoS issue - if the system is supposed to allow multiple opens, an abusive
process can ioctl() it and break it.
[-- Attachment #2: Type: application/pgp-signature, Size: 227 bytes --]
next prev parent reply other threads:[~2009-11-04 3:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-03 0:35 Jason Gunthorpe
2009-11-03 10:43 ` Alan Cox
2009-11-03 17:15 ` Jason Gunthorpe
2009-11-03 17:31 ` [tpmdd-devel] " Hal Finney
2009-11-03 17:46 ` Jason Gunthorpe
2009-11-03 18:14 ` Valdis.Kletnieks
2009-11-03 22:41 ` Jason Gunthorpe
2009-11-04 3:24 ` Valdis.Kletnieks [this message]
2009-11-04 4:27 ` Jason Gunthorpe
2009-11-04 9:58 ` Alan Cox
2012-09-30 23:33 Jason Gunthorpe
2012-10-01 9:07 ` [tpmdd-devel] " Peter.Huewe
2012-10-01 16:09 ` Jason Gunthorpe
2012-10-10 16:33 ` Kent Yoder
2012-10-12 20:56 ` Jason Gunthorpe
2012-10-15 8:35 ` [tpmdd-devel] " Peter.Huewe
2012-10-15 16:39 ` Jason Gunthorpe
2012-10-15 16:49 ` Alan Cox
2012-10-15 16:56 ` Jason Gunthorpe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=13189.1257305069@turing-police.cc.vt.edu \
--to=valdis.kletnieks@vt.edu \
--cc=hal.finney@gmail.com \
--cc=jgunthorpe@obsidianresearch.com \
--cc=linux-kernel@vger.kernel.org \
--cc=srajiv@linux.vnet.ibm.com \
--cc=tpmdd-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®