From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Jimmy Zhang <jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: Allen Martin <AMartin-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
"alban.bedel-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org"
<alban.bedel-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>,
"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [tegrarcm PATCH v1 3/4] Add option --signed
Date: Wed, 9 Mar 2016 14:03:06 -0700 [thread overview]
Message-ID: <56E08F8A.5060004@wwwdotorg.org> (raw)
In-Reply-To: <efdc080b4a0f4bd4a8a736d947417acd-wO81nVYWzR7YuxH7O460wFaTQe2KTcn/@public.gmane.org>
On 03/09/2016 02:01 PM, Jimmy Zhang wrote:
>
>
>> -----Original Message-----
>> From: Stephen Warren [mailto:swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org]
>> Sent: Wednesday, March 09, 2016 9:29 AM
>> To: Jimmy Zhang
>> Cc: Allen Martin; Stephen Warren; alban.bedel-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org; linux-
>> tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> Subject: Re: [tegrarcm PATCH v1 3/4] Add option --signed
>>
>> On 03/08/2016 05:36 PM, Jimmy Zhang wrote:
>>>
>>>
>>>> -----Original Message-----
>>>> From: Stephen Warren [mailto:swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org]
>>>> Sent: Monday, March 07, 2016 12:32 PM
>>>> To: Jimmy Zhang
>>>> Cc: Allen Martin; Stephen Warren; alban.bedel-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org;
>>>> linux- tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>>>> Subject: Re: [tegrarcm PATCH v1 3/4] Add option --signed
>>>>
>>>> On 03/04/2016 04:44 PM, Jimmy Zhang wrote:
>>>>> This option allows user to specify and download signed rcm messages
>>>>> and bootloader to device. This option must come along with option
>>>>> "--
>>>> miniloader".
>>>>>
>>>>> Example:
>>>>> $ sudo ./tegrarcm --miniloader t124_ml_rcm.bin --signed --bct
>>>>> test.bct --bootloader u-boo
>>>>
>>>> I won't review this patch in detail since I expect it will change
>>>> quite a bit to implement 3 modes of operation:
>>>>
>>>
>>> All three modes are in place.
>>>
>>>> a) Create signed files, don't interact with HW.
>>>
>>> This is patch 2/4. Command syntax:
>>> $ sudo ./tegrarcm --ml_rcm <ml> --pkc <keyfile> --bootloader
>>> <bootloader>
>>>
>>> User still needs to put device in recovery mode so that tegrarcm can detect
>> and figure out what soc. Otherwise, we need to add one more parameter for
>> soc.
>>>
>>>> b) Read signed files, send them to HW.
>>>
>>> This is patch 3/4. Command syntax:
>>> $ sudo ./tegrarcm --miniloader <signed_ml> --signed --bct <bct>
>>> --bootloader <bootloader> --loadaddr <addr>
>>>
>>>> c) Sign data on-the-fly, while sending it to HW.
>>>
>>> This is patch 1/4. Command syntax:
>>> $ sudo ./tegrarcm --pkc <keyfile> --bct <bct> --bootloader
>>> <bootloader> --loadaddr <addr>
>>
>> OK. Updating the documentation would be useful to make this clear.
>>
>> I don't like describing the file that contains signed data as a miniloader.
>> Doesn't the file contain much more than the miniloader (IIUC, all the RCM
>> messages need to be signed, so presumably we need to pre-calculate and
>> store all RCM messages to avoid tegrarcm needing access to the PKC which is
>> the whole point of this mode of operation)? I would like to see the --
>> miniloader option reserved for the case where we allow the user to supply
>> an alternative (plain unsigned, no header) miniloader binary instead of the
>> built-in binary.
>>
>> As I probably mentioned before, the naming of --ml_rcm isn't great.
>>
>> I don't like the fact that the operational mode is derived from the set of
>> command-line arguments. I'd like the default to be to interact with HW,
>> perform signatures if required, and download data to the HW. I'd prefer the
>> other modes to be explicitly requested so it's clear what the tool will do;
>> perhaps something like:
>>
>> download unsigned:
>> tegrarcm --bootloader <bl> --loadaddr <addr>
>>
>> download with auto-signing:
>> tegrarcm --bootloader <bl> --loadaddr <addr> --pkc <pkc>
>>
>> generate signed messages:
>> tegrarcm --gen-signed-msgs --signed-msgs-file msgs.bin \
>> --bootloader <bl> --loadaddr <addr> --pkc <pkc>
>>
> The signed messages include
> a) query version rcm
> b) download miniloader rcm
> c) bl signature
>
> During flashing, tegrarcm needs to down load these three blobs as independent binary to target at predefined flashing phase. Currently I use option "--ml_rcm" and "--bootloader" to derive filenames for these three blobs. If using one file for all, we have to come up a mechanism to pack them together during signing and unpack them when flashing. I agree with your command line parameter. But, I still prefer to create separate message files. For example, if I have a command as below:
>
> tegrarcm --gen-signed-msgs --signed-msgs-file rel_1001.bin \
> --bootloader <bl> --loadaddr <addr> --pkc <pkc>
>
> I prefer to actually create files
> a) rel_1001.bin.qry for signed query version rcm
> b) rel_1001.bin.ml for signed download miniloader rcm
> c) rel_1001.bin.bl for bootloader's 256 bytes rsa_pss signature
>
> User should have doc to trace what key_file, bootloader (flasher) are used for rel_1001
That seems fine.
next prev parent reply other threads:[~2016-03-09 21:03 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-04 23:44 [tegrarcm PATCH v1 0/4] Add flashing support for T124 rsa fused board Jimmy Zhang
[not found] ` <1457135087-967-1-git-send-email-jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-03-04 23:44 ` [tegrarcm PATCH v1 1/4] Add option "--pkc" Jimmy Zhang
[not found] ` <1457135087-967-2-git-send-email-jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-03-05 1:43 ` Allen Martin
2016-03-07 19:55 ` Stephen Warren
[not found] ` <56DDDCC8.9090803-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2016-03-09 0:50 ` Jimmy Zhang
[not found] ` <6dc28718c5ec4d4aba4bcafcf36409be-wO81nVYWzR7YuxH7O460wFaTQe2KTcn/@public.gmane.org>
2016-03-09 17:32 ` Stephen Warren
2016-03-04 23:44 ` [tegrarcm PATCH v1 2/4] Add option --ml_rcm <rcm_ml_blob> Jimmy Zhang
[not found] ` <1457135087-967-3-git-send-email-jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-03-05 1:25 ` Allen Martin
[not found] ` <20160305012506.GA19189-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-03-05 2:35 ` Jimmy Zhang
[not found] ` <b47263cc6b5a412bbbb9cd4a17d223cf-wO81nVYWzR7YuxH7O460wFaTQe2KTcn/@public.gmane.org>
2016-03-07 8:54 ` Thierry Reding
2016-03-07 20:15 ` Stephen Warren
[not found] ` <56DDE16A.8030809-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2016-03-09 1:21 ` Jimmy Zhang
[not found] ` <efa82104830b489a8ebe29238bb48034-wO81nVYWzR7YuxH7O460wFaTQe2KTcn/@public.gmane.org>
2016-03-09 17:35 ` Stephen Warren
2016-03-04 23:44 ` [tegrarcm PATCH v1 3/4] Add option --signed Jimmy Zhang
[not found] ` <1457135087-967-4-git-send-email-jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-03-07 8:58 ` Thierry Reding
2016-03-07 20:31 ` Stephen Warren
[not found] ` <56DDE53D.4060206-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2016-03-09 0:36 ` Jimmy Zhang
[not found] ` <90950f4d7098476891feda7e5e803cfa-wO81nVYWzR7YuxH7O460wFaTQe2KTcn/@public.gmane.org>
2016-03-09 17:29 ` Stephen Warren
[not found] ` <56E05D75.5050707-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2016-03-09 21:01 ` Jimmy Zhang
[not found] ` <efdc080b4a0f4bd4a8a736d947417acd-wO81nVYWzR7YuxH7O460wFaTQe2KTcn/@public.gmane.org>
2016-03-09 21:03 ` Stephen Warren [this message]
2016-03-04 23:44 ` [tegrarcm PATCH v1 4/4] Increate USB timeout value Jimmy Zhang
[not found] ` <1457135087-967-5-git-send-email-jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-03-05 1:46 ` Allen Martin
[not found] ` <20160305014644.GC19189-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-03-05 2:39 ` Jimmy Zhang
2016-03-07 19:39 ` Stephen Warren
[not found] ` <56DDD90B.1040802-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2016-03-09 1:41 ` Jimmy Zhang
[not found] ` <973e4d88a8a24062964655a6ec3b2c71-wO81nVYWzR7YuxH7O460wFaTQe2KTcn/@public.gmane.org>
2016-03-09 17:41 ` Stephen Warren
[not found] ` <56E06042.2060604-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2016-03-09 19:56 ` 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=56E08F8A.5060004@wwwdotorg.org \
--to=swarren-3lzwwm7+weoh9zmkesr00q@public.gmane.org \
--cc=AMartin-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=alban.bedel-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@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