Re: [PATCH v1.5 4/5] keys: add new trusted key-type

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Howells
Date: Wednesday, December 1, 2010 - 10:48 am

Mimi Zohar <zohar@linux.vnet.ibm.com> wrote:


You seem to have made a bunch of integer length parameters 'const'.  Why?  I
was suggesting making them size_t, not const.

I was suggesting making the data pointers const.


TSS_rawhmac() can return an error.


trusted_tpm_send() won't fail?


Isn't is it pointless to use kzalloc() rather than kmalloc()?


my_get_random() won't fail?


These can be merged.


If you don't need to return ret specifically, returning 0 would be more
efficient.


Don't do that if TSS_checkhmac1() fails.


TSS_authhmac() is called several times without checking for errors.


Don't do the memcpy() if TSS_checkhmac2() fails.


Don't do that if tpm_unseal() fails.


Spaces after { and before }.  I'd also suggest using tabs to align the strings
vertically, but that's up to you.


NAK!  p might be NULL.

David
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH v1.5 0/5] keys: trusted and encrypted keys, Mimi Zohar, (Tue Nov 23, 3:50 pm)
[PATCH v1.5 2/5] tpm: add module_put wrapper, Mimi Zohar, (Tue Nov 23, 3:50 pm)
[PATCH v1.5 4/5] keys: add new trusted key-type, Mimi Zohar, (Tue Nov 23, 3:50 pm)
[PATCH v1.5 3/5] key: add tpm_send command, Mimi Zohar, (Tue Nov 23, 4:54 pm)
Re: [PATCH v1.5 2/5] tpm: add module_put wrapper, Serge Hallyn, (Tue Nov 23, 7:19 pm)
Re: [PATCH v1.5 3/5] key: add tpm_send command, Serge Hallyn, (Tue Nov 23, 7:32 pm)
Re: [PATCH v1.5 3/5] key: add tpm_send command, David Safford, (Wed Nov 24, 5:46 am)
Re: [PATCH v1.5 3/5] key: add tpm_send command, Serge Hallyn, (Wed Nov 24, 7:59 am)
[PATCH v1.5 5/5] keys: add new key-type encrypted, Mimi Zohar, (Wed Nov 24, 9:21 am)
Re: [PATCH v1.5 3/5] key: add tpm_send command, David Safford, (Wed Nov 24, 9:31 am)
Re: [PATCH v1.5 0/5] keys: trusted and encrypted keys, James Morris, (Sun Nov 28, 2:56 pm)
Re: [PATCH v1.5 3/5] key: add tpm_send command, David Howells, (Tue Nov 30, 7:32 am)
Re: [PATCH v1.5 3/5] key: add tpm_send command, David Safford, (Tue Nov 30, 8:22 am)
Re: [PATCH v1.5 4/5] keys: add new trusted key-type, David Howells, (Wed Dec 1, 10:48 am)
Re: [PATCH v1.5 4/5] keys: add new trusted key-type, David Safford, (Wed Dec 1, 2:18 pm)
Re: [PATCH v1.5 5/5] keys: add new key-type encrypted, David Howells, (Fri Dec 3, 6:42 am)
Re: [PATCH v1.5 5/5] keys: add new key-type encrypted, David Howells, (Wed Dec 8, 3:54 am)