Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1535442 > unrolled thread
| Started by | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> |
|---|---|
| First post | 2016-12-03 16:40 +0100 |
| Last post | 2016-12-06 13:20 +0100 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v2 1/4] tpm: add kdoc for tpm_transmit and tpm_transmit_cmd Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-12-03 16:40 +0100
Re: [PATCH v2 1/4] tpm: add kdoc for tpm_transmit and tpm_transmit_cmd Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-12-03 17:20 +0100
Re: [tpmdd-devel] [PATCH v2 1/4] tpm: add kdoc for tpm_transmit and tpm_transmit_cmd Nayna <nayna@linux.vnet.ibm.com> - 2016-12-06 10:20 +0100
RE: [tpmdd-devel] [PATCH v2 1/4] tpm: add kdoc for tpm_transmit and tpm_transmit_cmd "Winkler, Tomas" <tomas.winkler@intel.com> - 2016-12-06 13:20 +0100
| From | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> |
|---|---|
| Date | 2016-12-03 16:40 +0100 |
| Subject | Re: [PATCH v2 1/4] tpm: add kdoc for tpm_transmit and tpm_transmit_cmd |
| Message-ID | <sKkzT-36C-13@gated-at.bofh.it> |
On Wed, Nov 23, 2016 at 12:04:11PM +0200, Tomas Winkler wrote:
> Functions tpm_transmit and transmit_cmd are referenced
> from other functions kdoc hence deserve documentation.
>
> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Do you mind if I change TPM_DIGEST_SIZE to SHA1_DIGEST_SIZE?
I'm looking to drop TPM_DIGEST_SIZE eventually.
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
/Jarkko
> ---
> V2: Add some missing '.'
> drivers/char/tpm/tpm-interface.c | 33 ++++++++++++++++++++++++++++-----
> 1 file changed, 28 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c
> index a2688ac2b48f..769d8b0d31a3 100644
> --- a/drivers/char/tpm/tpm-interface.c
> +++ b/drivers/char/tpm/tpm-interface.c
> @@ -328,8 +328,17 @@ unsigned long tpm_calc_ordinal_duration(struct tpm_chip *chip,
> }
> EXPORT_SYMBOL_GPL(tpm_calc_ordinal_duration);
>
> -/*
> - * Internal kernel interface to transmit TPM commands
> +/**
> + * tmp_transmit - Internal kernel interface to transmit TPM commands.
> + *
> + * @chip: TPM chip to use
> + * @buf: TPM command buffer
> + * @bufsiz: length of the TPM command buffer
> + * @flags: tpm transmit flags - bitmap
> + *
> + * Return:
> + * 0 when the operation is successful.
> + * A negative number for system errors (errno).
> */
> ssize_t tpm_transmit(struct tpm_chip *chip, const u8 *buf, size_t bufsiz,
> unsigned int flags)
> @@ -409,9 +418,21 @@ ssize_t tpm_transmit(struct tpm_chip *chip, const u8 *buf, size_t bufsiz,
> return rc;
> }
>
> -#define TPM_DIGEST_SIZE 20
> -#define TPM_RET_CODE_IDX 6
> -
> +/**
> + * tmp_transmit_cmd - send a tpm command to the device
> + * The function extracts tpm out header return code
> + *
> + * @chip: TPM chip to use
> + * @cmd: TPM command buffer
> + * @len: length of the TPM command
> + * @flags: tpm transmit flags - bitmap
> + * @desc: command description used in the error message
> + *
> + * Return:
> + * 0 when the operation is successful.
> + * A negative number for system errors (errno).
> + * A positive number for a TPM error.
> + */
> ssize_t tpm_transmit_cmd(struct tpm_chip *chip, const void *cmd,
> int len, unsigned int flags, const char *desc)
> {
> @@ -434,6 +455,8 @@ ssize_t tpm_transmit_cmd(struct tpm_chip *chip, const void *cmd,
> return err;
> }
>
> +#define TPM_DIGEST_SIZE 20
> +#define TPM_RET_CODE_IDX 6
> #define TPM_INTERNAL_RESULT_SIZE 200
> #define TPM_ORD_GET_CAP cpu_to_be32(101)
> #define TPM_ORD_GET_RANDOM cpu_to_be32(70)
> --
> 2.7.4
>
[toc] | [next] | [standalone]
| From | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> |
|---|---|
| Date | 2016-12-03 17:20 +0100 |
| Message-ID | <sKlcC-3CC-3@gated-at.bofh.it> |
| In reply to | #1535442 |
On Sat, Dec 03, 2016 at 05:32:36PM +0200, Jarkko Sakkinen wrote: > On Wed, Nov 23, 2016 at 12:04:11PM +0200, Tomas Winkler wrote: > > Functions tpm_transmit and transmit_cmd are referenced > > from other functions kdoc hence deserve documentation. > > > > Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> > > Do you mind if I change TPM_DIGEST_SIZE to SHA1_DIGEST_SIZE? > > I'm looking to drop TPM_DIGEST_SIZE eventually. > > Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Tested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> ... in the sense that the changes do not break the compilation and do not produce sparse or cocciheck errors. I guess that should be enough for documentation changes. /Jarkko
[toc] | [prev] | [next] | [standalone]
| From | Nayna <nayna@linux.vnet.ibm.com> |
|---|---|
| Date | 2016-12-06 10:20 +0100 |
| Subject | Re: [tpmdd-devel] [PATCH v2 1/4] tpm: add kdoc for tpm_transmit and tpm_transmit_cmd |
| Message-ID | <sLk4N-84-25@gated-at.bofh.it> |
| In reply to | #1535442 |
On 12/03/2016 09:02 PM, Jarkko Sakkinen wrote:
> On Wed, Nov 23, 2016 at 12:04:11PM +0200, Tomas Winkler wrote:
>> Functions tpm_transmit and transmit_cmd are referenced
>> from other functions kdoc hence deserve documentation.
>>
>> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
>
> Do you mind if I change TPM_DIGEST_SIZE to SHA1_DIGEST_SIZE?
>
> I'm looking to drop TPM_DIGEST_SIZE eventually.
I was thinking if we should use SHA1_DIGEST_SIZE directly from
<crypto/sha.h>, or probably <crypto/hash_info.h>
Thanks & Regards,
- Nayna
>
> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
>
> /Jarkko
>
>> ---
>> V2: Add some missing '.'
>> drivers/char/tpm/tpm-interface.c | 33 ++++++++++++++++++++++++++++-----
>> 1 file changed, 28 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c
>> index a2688ac2b48f..769d8b0d31a3 100644
>> --- a/drivers/char/tpm/tpm-interface.c
>> +++ b/drivers/char/tpm/tpm-interface.c
>> @@ -328,8 +328,17 @@ unsigned long tpm_calc_ordinal_duration(struct tpm_chip *chip,
>> }
>> EXPORT_SYMBOL_GPL(tpm_calc_ordinal_duration);
>>
>> -/*
>> - * Internal kernel interface to transmit TPM commands
>> +/**
>> + * tmp_transmit - Internal kernel interface to transmit TPM commands.
>> + *
>> + * @chip: TPM chip to use
>> + * @buf: TPM command buffer
>> + * @bufsiz: length of the TPM command buffer
>> + * @flags: tpm transmit flags - bitmap
>> + *
>> + * Return:
>> + * 0 when the operation is successful.
>> + * A negative number for system errors (errno).
>> */
>> ssize_t tpm_transmit(struct tpm_chip *chip, const u8 *buf, size_t bufsiz,
>> unsigned int flags)
>> @@ -409,9 +418,21 @@ ssize_t tpm_transmit(struct tpm_chip *chip, const u8 *buf, size_t bufsiz,
>> return rc;
>> }
>>
>> -#define TPM_DIGEST_SIZE 20
>> -#define TPM_RET_CODE_IDX 6
>> -
>> +/**
>> + * tmp_transmit_cmd - send a tpm command to the device
>> + * The function extracts tpm out header return code
>> + *
>> + * @chip: TPM chip to use
>> + * @cmd: TPM command buffer
>> + * @len: length of the TPM command
>> + * @flags: tpm transmit flags - bitmap
>> + * @desc: command description used in the error message
>> + *
>> + * Return:
>> + * 0 when the operation is successful.
>> + * A negative number for system errors (errno).
>> + * A positive number for a TPM error.
>> + */
>> ssize_t tpm_transmit_cmd(struct tpm_chip *chip, const void *cmd,
>> int len, unsigned int flags, const char *desc)
>> {
>> @@ -434,6 +455,8 @@ ssize_t tpm_transmit_cmd(struct tpm_chip *chip, const void *cmd,
>> return err;
>> }
>>
>> +#define TPM_DIGEST_SIZE 20
>> +#define TPM_RET_CODE_IDX 6
>> #define TPM_INTERNAL_RESULT_SIZE 200
>> #define TPM_ORD_GET_CAP cpu_to_be32(101)
>> #define TPM_ORD_GET_RANDOM cpu_to_be32(70)
>> --
>> 2.7.4
>>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> tpmdd-devel mailing list
> tpmdd-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tpmdd-devel
>
[toc] | [prev] | [next] | [standalone]
| From | "Winkler, Tomas" <tomas.winkler@intel.com> |
|---|---|
| Date | 2016-12-06 13:20 +0100 |
| Subject | RE: [tpmdd-devel] [PATCH v2 1/4] tpm: add kdoc for tpm_transmit and tpm_transmit_cmd |
| Message-ID | <sLmSZ-1WA-7@gated-at.bofh.it> |
| In reply to | #1536790 |
> -----Original Message-----
> From: Nayna [mailto:nayna@linux.vnet.ibm.com]
> Sent: Tuesday, December 06, 2016 11:17
> To: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>; Winkler, Tomas
> <tomas.winkler@intel.com>
> Cc: tpmdd-devel@lists.sourceforge.net; linux-kernel@vger.kernel.org
> Subject: Re: [tpmdd-devel] [PATCH v2 1/4] tpm: add kdoc for tpm_transmit and
> tpm_transmit_cmd
>
>
>
> On 12/03/2016 09:02 PM, Jarkko Sakkinen wrote:
> > On Wed, Nov 23, 2016 at 12:04:11PM +0200, Tomas Winkler wrote:
> >> Functions tpm_transmit and transmit_cmd are referenced from other
> >> functions kdoc hence deserve documentation.
> >>
> >> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
> >
> > Do you mind if I change TPM_DIGEST_SIZE to SHA1_DIGEST_SIZE?
> >
> > I'm looking to drop TPM_DIGEST_SIZE eventually.
>
> I was thinking if we should use SHA1_DIGEST_SIZE directly from <crypto/sha.h>,
> or probably <crypto/hash_info.h>
Probably the best approach
Tomas
>
> >
> > Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> >
> > /Jarkko
> >
> >> ---
> >> V2: Add some missing '.'
> >> drivers/char/tpm/tpm-interface.c | 33 ++++++++++++++++++++++++++++--
> ---
> >> 1 file changed, 28 insertions(+), 5 deletions(-)
> >>
> >> diff --git a/drivers/char/tpm/tpm-interface.c
> >> b/drivers/char/tpm/tpm-interface.c
> >> index a2688ac2b48f..769d8b0d31a3 100644
> >> --- a/drivers/char/tpm/tpm-interface.c
> >> +++ b/drivers/char/tpm/tpm-interface.c
> >> @@ -328,8 +328,17 @@ unsigned long tpm_calc_ordinal_duration(struct
> tpm_chip *chip,
> >> }
> >> EXPORT_SYMBOL_GPL(tpm_calc_ordinal_duration);
> >>
> >> -/*
> >> - * Internal kernel interface to transmit TPM commands
> >> +/**
> >> + * tmp_transmit - Internal kernel interface to transmit TPM commands.
> >> + *
> >> + * @chip: TPM chip to use
> >> + * @buf: TPM command buffer
> >> + * @bufsiz: length of the TPM command buffer
> >> + * @flags: tpm transmit flags - bitmap
> >> + *
> >> + * Return:
> >> + * 0 when the operation is successful.
> >> + * A negative number for system errors (errno).
> >> */
> >> ssize_t tpm_transmit(struct tpm_chip *chip, const u8 *buf, size_t bufsiz,
> >> unsigned int flags)
> >> @@ -409,9 +418,21 @@ ssize_t tpm_transmit(struct tpm_chip *chip, const
> u8 *buf, size_t bufsiz,
> >> return rc;
> >> }
> >>
> >> -#define TPM_DIGEST_SIZE 20
> >> -#define TPM_RET_CODE_IDX 6
> >> -
> >> +/**
> >> + * tmp_transmit_cmd - send a tpm command to the device
> >> + * The function extracts tpm out header return code
> >> + *
> >> + * @chip: TPM chip to use
> >> + * @cmd: TPM command buffer
> >> + * @len: length of the TPM command
> >> + * @flags: tpm transmit flags - bitmap
> >> + * @desc: command description used in the error message
> >> + *
> >> + * Return:
> >> + * 0 when the operation is successful.
> >> + * A negative number for system errors (errno).
> >> + * A positive number for a TPM error.
> >> + */
> >> ssize_t tpm_transmit_cmd(struct tpm_chip *chip, const void *cmd,
> >> int len, unsigned int flags, const char *desc)
> >> {
> >> @@ -434,6 +455,8 @@ ssize_t tpm_transmit_cmd(struct tpm_chip *chip,
> const void *cmd,
> >> return err;
> >> }
> >>
> >> +#define TPM_DIGEST_SIZE 20
> >> +#define TPM_RET_CODE_IDX 6
> >> #define TPM_INTERNAL_RESULT_SIZE 200
> >> #define TPM_ORD_GET_CAP cpu_to_be32(101)
> >> #define TPM_ORD_GET_RANDOM cpu_to_be32(70)
> >> --
> >> 2.7.4
> >>
> >
> > ----------------------------------------------------------------------
> > -------- Check out the vibrant tech community on one of the world's
> > most engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> > _______________________________________________
> > tpmdd-devel mailing list
> > tpmdd-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/tpmdd-devel
> >
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web