linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Jimmy Zhang <jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: amartin-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
	swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [cbootimage PATCH v1 2/8] Add bct_dump support for t210
Date: Mon, 21 Sep 2015 14:05:45 -0600	[thread overview]
Message-ID: <56006319.5030009@wwwdotorg.org> (raw)
In-Reply-To: <1441228760-26042-3-git-send-email-jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

On 09/02/2015 03:19 PM, Jimmy Zhang wrote:
> Added support to dump additional fields such as rsa pubkey, rsa pss
> signatures for bct and bootloader.

> diff --git a/src/bct_dump.c b/src/bct_dump.c

> @@ -54,11 +57,13 @@ static value_data const values[] = {
>   	{ token_odm_data,            "OdmData       = ", format_u32_hex8 },
>   	{ token_secure_jtag_control, "JtagCtrl      = ", format_u32_hex8 },
>   	{ token_secure_debug_control, "DebugCtrl     = ", format_u32_hex8 },
> +	{ token_crypto_hash, 	     "BCT AES Hash  = ", format_hex_16_bytes },
> +	{ token_pub_key_modulus,     "PubKeyModulus = ", format_rsa_param },
> +	{ token_rsa_pss_sig_bct,     "RsaPssSig_Bct = ", format_rsa_param },

The previous patch didn't have an underscore in the keyword name. We 
should be able to feed the output of bctdump straight back into 
cbootimage without having to manually fix up the syntax.

That said, I wonder if either (a) shouldn't this data be dumped to a 
file, since cbootimage would read it from a separate file (b) shouldn't 
cbootimage read the data from an inline value not a separate file. The 
use can always use the C pre-processor or similar "code generation" 
techniques to create the file from a template in order to use different 
keys for different devices.

> -	{ token_hash_size,           "# Hash size             = ", format_u32 },

Is there a reason for removing that? If so, it should be mentioned in 
the patch description.

> diff --git a/src/t210/nvbctlib_t210.c b/src/t210/nvbctlib_t210.c

> +	case token_rsa_pss_sig_bl:
> +		/* ONLY support one bl */
> +		memcpy(data, &bct_ptr->bootloader[set].signature.rsa_pss_sig,
> +			sizeof(nvboot_rsa_pss_sig));
> +		break;

Same objection about that comment here as in the previous patch.

> @@ -2121,15 +2128,23 @@ t210_bct_get_value(parse_token id, void *data, u_int8_t *bct)

>   	case token_crypto_hash:
> -		memcpy(data,
> -		&(bct_ptr->signature.crypto_hash),
> -		sizeof(nvboot_hash));
> +		memcpy(data, &(bct_ptr->signature.crypto_hash),
> +			sizeof(nvboot_hash));

This feels like an unrelated cleanup patch?

  parent reply	other threads:[~2015-09-21 20:05 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-02 21:19 [cbootimage PATCH v1 0/8] Add rsa pss signature support Jimmy Zhang
     [not found] ` <1441228760-26042-1-git-send-email-jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-09-02 21:19   ` [cbootimage PATCH v1 1/8] Enable --update | -u option support for t210 Jimmy Zhang
     [not found]     ` <1441228760-26042-2-git-send-email-jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-09-21 19:55       ` Stephen Warren
     [not found]         ` <5600609F.60002-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2015-09-21 23:07           ` Jimmy Zhang
2015-09-02 21:19   ` [cbootimage PATCH v1 2/8] Add bct_dump " Jimmy Zhang
     [not found]     ` <1441228760-26042-3-git-send-email-jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-09-21 20:05       ` Stephen Warren [this message]
     [not found]         ` <56006319.5030009-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2015-09-21 23:27           ` Jimmy Zhang
2015-09-02 21:19   ` [cbootimage PATCH v1 3/8] Add in libmcrypto Jimmy Zhang
     [not found]     ` <1441228760-26042-4-git-send-email-jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-09-21 20:11       ` Stephen Warren
     [not found]         ` <56006457.4040601-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2015-09-22  0:05           ` Jimmy Zhang
2015-09-02 21:19   ` [cbootimage PATCH v1 4/8] Add new configuration keyword "PkcKey" Jimmy Zhang
     [not found]     ` <1441228760-26042-5-git-send-email-jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-09-21 21:41       ` Stephen Warren
     [not found]         ` <56007980.6060203-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2015-09-22 18:07           ` Jimmy Zhang
2015-09-02 21:19   ` [cbootimage PATCH v1 5/8] Fix some issues found in libmcrypto Jimmy Zhang
     [not found]     ` <1441228760-26042-6-git-send-email-jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-09-21 22:08       ` Stephen Warren
     [not found]         ` <56007FEB.7010408-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2015-09-22  1:11           ` Jimmy Zhang
2015-09-02 21:19   ` [cbootimage PATCH v1 6/8] Add new configuration keyword "ReSignBl" Jimmy Zhang
     [not found]     ` <1441228760-26042-7-git-send-email-jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-09-21 22:10       ` Stephen Warren
     [not found]         ` <5600804F.402-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2015-09-22  0:45           ` Jimmy Zhang
2015-09-02 21:19   ` [cbootimage PATCH v1 7/8] Add new command line option "--sign | -n" to sign binary image Jimmy Zhang
     [not found]     ` <1441228760-26042-8-git-send-email-jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-09-21 22:13       ` Stephen Warren
     [not found]         ` <560080F8.9090008-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2015-09-22  0:36           ` Jimmy Zhang
2015-09-02 21:19   ` [cbootimage PATCH v1 8/8] Bump to version 1.6 Jimmy Zhang
2015-09-08 17:19   ` [cbootimage PATCH v1 0/8] Add rsa pss signature support Jimmy Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56006319.5030009@wwwdotorg.org \
    --to=swarren-3lzwwm7+weoh9zmkesr00q@public.gmane.org \
    --cc=amartin-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).