Re: [PATCH v1.3 2/4] key: add tpm_send command

2010-11-17 Thread Rajiv Andrade
On 12/11/10 20:11, David Howells wrote: David Safford wrote: David, does this look ok to you? If so, I will do two patches, one to fix the helper name throughout the existing tpm.c, and then a new version of the tpm_send patch which uses the new name. I prefer my suggestion: Wrapping the modu

Re: [PATCH v1.3 2/4] key: add tpm_send command

2010-11-12 Thread David Howells
David Safford wrote: > David, does this look ok to you? If so, I will do two patches, one to > fix the helper name throughout the existing tpm.c, and then a new > version of the tpm_send patch which uses the new name. I prefer my suggestion: Wrapping the module_put() up so that you don't see it

Re: [PATCH v1.3 2/4] key: add tpm_send command

2010-11-12 Thread David Safford
On Fri, 2010-11-12 at 19:24 -0200, Rajiv Andrade wrote: > > Hi Dave, > > On 11/12/2010 12:48 PM, David Safford wrote: > > > On Fri, 2010-11-12 at 14:11 +, David Howells wrote: > >> Mimi Zohar wrote: > >> > > + module_put(chip->dev->driver->owner); > Where's the corresponding

Re: [PATCH v1.3 2/4] key: add tpm_send command

2010-11-12 Thread Rajiv Andrade
Hi Dave, On 11/12/2010 12:48 PM, David Safford wrote: On Fri, 2010-11-12 at 14:11 +, David Howells wrote: Mimi Zohar wrote: + module_put(chip->dev->driver->owner); Where's the corresponding module_get()? I suspect this should be wrapped to match tpm_chip_find_get(). David Th

Re: [PATCH v1.3 2/4] key: add tpm_send command

2010-11-12 Thread David Safford
On Fri, 2010-11-12 at 14:11 +, David Howells wrote: > Mimi Zohar wrote: > > > > > + module_put(chip->dev->driver->owner); > > > > > > Where's the corresponding module_get()? I suspect this should be wrapped > > > to > > > match tpm_chip_find_get(). > > > > > > David > > > > The mod

Re: [PATCH v1.3 2/4] key: add tpm_send command

2010-11-12 Thread David Howells
Mimi Zohar wrote: > > > + module_put(chip->dev->driver->owner); > > > > Where's the corresponding module_get()? I suspect this should be wrapped to > > match tpm_chip_find_get(). > > > > David > > The module_get() is in tpm_chip_find_get(), which is just a helper. > (It's used this way throug

Re: [PATCH v1.3 2/4] key: add tpm_send command

2010-11-11 Thread Mimi Zohar
On Thu, 2010-11-11 at 19:48 +, David Howells wrote: > Mimi Zohar wrote: > > > Reviewd-by: Mimi Zohar > > You've missed an 'e'. thanks, will fix > > +int tpm_send(u32 chip_num, char *cmd, int buflen) > > +{ > > ... > > + rc = transmit_cmd(chip, (struct tpm_cmd_t *)cmd, buflen, > > +

Re: [PATCH v1.3 2/4] key: add tpm_send command

2010-11-11 Thread David Howells
Mimi Zohar wrote: > Reviewd-by: Mimi Zohar You've missed an 'e'. > +int tpm_send(u32 chip_num, char *cmd, int buflen) > +{ > ... > + rc = transmit_cmd(chip, (struct tpm_cmd_t *)cmd, buflen, > + "attempting tpm_cmd"); Make cmd 'void *' to obviate the cast. Preferably

[PATCH v1.3 2/4] key: add tpm_send command

2010-11-10 Thread Mimi Zohar
Add internal kernel tpm_send() command used to seal/unseal keys. Signed-off-by: David Safford Reviewd-by: Mimi Zohar Acked-by: Rajiv Andrade Acked-by: Serge E. Hallyn --- drivers/char/tpm/tpm.c | 17 + include/linux/tpm.h|3 +++ 2 files changed, 20 insertions(+), 0 d