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>,
"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [tegrarcm PATCH v2 4/4] Add new configuration keyword "ReSignBl"
Date: Thu, 8 Oct 2015 08:35:55 -0600 [thread overview]
Message-ID: <56167F4B.3010205@wwwdotorg.org> (raw)
In-Reply-To: <fcfafb34ac0b43e792291192ddaeb516-wO81nVYWzR7YuxH7O460wFaTQe2KTcn/@public.gmane.org>
On 10/07/2015 04:45 PM, Jimmy Zhang wrote:
> Stephen Warren wrote at Wednesday, October 07, 2015 10:11 AM:
>> On 10/02/2015 02:57 PM, Jimmy Zhang wrote:
>>> This feature is needed in case an image is updated at later stage
>>> after it has been created.
>>>
>>> How to use:
>>> Add keyword "ReSignBl" to configuration file, for example resign.cfg:
>>> ReSignBl;
>>>
>>> Invoke cbootimage to resign image, for example bootloader.bin:
>>> $ cbootimage -s tegra210 --update resign.cfg bootloader.bin
>>> bootloader.bin-resigned
>>>
>>> Where bootloader.bin-resigned is the resigned bootloader.bin
>>> diff --git a/src/crypto.c b/src/crypto.c
>>
>>> +int
>>> +sign_bl(build_image_context *context,
>>> + u_int8_t *bootloader,
>>> + u_int32_t length,
>>> + u_int32_t image_instance)
>>> +{
>>> + int e = 0;
>>> + u_int8_t *hash_buffer;
>>> + u_int32_t hash_size;
>>> +
>>> + g_soc_config->get_value(token_hash_size,
>>> + &hash_size, context->bct);
>>
>> Ah, so there's already a function that can return the size of various objects in
>> the BCT. That will make option (b) in my review of patch 2 much easier then...
>
> Not sure what you mean exactly.
When I reviewed patch 2/4 I proposed 3 options for a change to ensure
that t210_bct_set_value() wasn't tied to chip-specific RSA parameter
sizes. Option (b) relied on t210_bct_set_value() calling into an
SoC-specific function to retrieve the RSA parameter sizes, which might
have meant creating new infra-structure to allow such a call. However,
given that g_soc_config->get_value() already exists, and is already used
by core code to retrieve the SoC-specific size of some objects, it turns
out that implementing option (b) should actually be trivial. Hence, it's
the best option.
prev parent reply other threads:[~2015-10-08 14:35 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-02 20:56 [tegrarcm PATCH v2 0/4] Enable --update option support for t210 Jimmy Zhang
[not found] ` <1443819420-26562-1-git-send-email-jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-10-02 20:56 ` [tegrarcm PATCH v2 1/4] Enable -u | " Jimmy Zhang
[not found] ` <1443819420-26562-2-git-send-email-jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-10-07 16:35 ` Stephen Warren
2015-10-02 20:56 ` [tegrarcm PATCH v2 2/4] Add support for update pubkey and rsa-pss signatures Jimmy Zhang
[not found] ` <1443819420-26562-3-git-send-email-jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-10-07 16:33 ` Stephen Warren
[not found] ` <56154969.6080501-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2015-10-08 20:39 ` Stephen Warren
2015-10-09 0:07 ` Jimmy Zhang
2015-10-07 17:00 ` Stephen Warren
[not found] ` <56154FC5.2000305-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2015-10-07 19:00 ` Jimmy Zhang
2015-10-07 17:08 ` Allen Martin
[not found] ` <20151007170821.GA29271-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-10-07 17:14 ` Stephen Warren
[not found] ` <561552E5.9040402-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2015-10-07 17:45 ` Allen Martin
2015-10-07 18:17 ` Jimmy Zhang
2015-10-02 20:56 ` [tegrarcm PATCH v2 3/4] Add support to dump rsa related fields for t210 Jimmy Zhang
[not found] ` <1443819420-26562-4-git-send-email-jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-10-07 16:45 ` Stephen Warren
[not found] ` <56154C29.90708-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2015-10-07 18:57 ` Jimmy Zhang
[not found] ` <8ad0a6e53ee44852a89c71989b584e1e-wO81nVYWzR7YuxH7O460wFaTQe2KTcn/@public.gmane.org>
2015-10-07 19:28 ` Stephen Warren
[not found] ` <56157261.9030000-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2015-10-07 22:10 ` Jimmy Zhang
2015-10-02 20:57 ` [tegrarcm PATCH v2 4/4] Add new configuration keyword "ReSignBl" Jimmy Zhang
[not found] ` <1443819420-26562-5-git-send-email-jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-10-07 17:11 ` Stephen Warren
[not found] ` <5615522C.50100-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2015-10-07 22:45 ` Jimmy Zhang
[not found] ` <fcfafb34ac0b43e792291192ddaeb516-wO81nVYWzR7YuxH7O460wFaTQe2KTcn/@public.gmane.org>
2015-10-08 14:35 ` Stephen Warren [this message]
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=56167F4B.3010205@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).