Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1565900
| From | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH RFC] tpm: define a command filter |
| Date | 2017-01-24 15:40 +0100 |
| Message-ID | <t3aql-5sP-1@gated-at.bofh.it> (permalink) |
| References | <t2WQq-581-29@gated-at.bofh.it> <t2X05-5ci-1@gated-at.bofh.it> |
| Organization | Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo |
On Mon, Jan 23, 2017 at 05:19:18PM -0700, Jason Gunthorpe wrote: > On Tue, Jan 24, 2017 at 02:02:52AM +0200, Jarkko Sakkinen wrote: > > This commit adds a command filter for whitelisting a set of commands in > > a TPM space. When a TPM space is created through /dev/tpms0, no > > commands are allowed. The user of the TPM space must explicitly define > > the list of commands allowed before sending any commands. This ioctl is > > a one shot call so that a resource manager daemon can call it before > > sending the file descriptor to the client. > > I don't think it makes sense to have a daemon in user space that > passes an open'd /dev/tpms0 FD directly to a client.. > > It is trivial and more powerful to just proxy the messages. Can you > see some reason why passing a FD through a daemon would make sense? > > The earlier discussion with James was to have some way to apply a > global command filter to all tpms0 users with the idea that the > 'right' restricted command set would enable a 0666 cdev node, and no > daemon. Is that a conflicting goal? Maybe the ioctl could be restricted by CAP_MAC_ADMIN in that case? How would you propose to change the code below? I guess the "core code" is about right and this is more about API, am I right? /Jarkko > > > Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> > > 1. This patch applies on top of 'tabrm4' brach. > > 2. Only compilation is tested (just drafted the idea) > > drivers/char/tpm/tpm-interface.c | 12 +++++-- > > drivers/char/tpm/tpm.h | 1 + > > drivers/char/tpm/tpm2-space.c | 7 ++++ > > drivers/char/tpm/tpms-dev.c | 75 ++++++++++++++++++++++++++++++++++++++++ > > include/uapi/linux/tpms.h | 29 ++++++++++++++++ > > BTW, don't forget to update kbuild when you add uapi files... Applies > to other patches.. > > Jason
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH RFC] tpm: define a command filter Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-01-24 01:10 +0100
Re: [PATCH RFC] tpm: define a command filter Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2017-01-24 01:20 +0100
Re: [PATCH RFC] tpm: define a command filter Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-01-24 15:40 +0100
Re: [PATCH RFC] tpm: define a command filter Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2017-01-24 20:10 +0100
Re: [PATCH RFC] tpm: define a command filter Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-01-25 21:30 +0100
Re: [PATCH RFC] tpm: define a command filter Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2017-01-25 23:20 +0100
Re: [PATCH RFC] tpm: define a command filter Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-01-26 12:20 +0100
Re: [PATCH RFC] tpm: define a command filter Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2017-01-26 19:10 +0100
Re: [PATCH RFC] tpm: define a command filter Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-01-27 07:50 +0100
csiph-web