Re: [tpmdd-devel] [PATCH] TPM: Let the tpm char device be openablemultiple times
From: Alan Cox
Date: Wed Nov 04 2009 - 04:57:13 EST
> 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.
What's wrong with "chmod" ?
BTW some drivers do also implement O_EXCL = one open semantics. It's not
exactly what POSIX expects but these are drivers and its a fairly logical
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/