* [U-Boot] rsa_verify calls fdt_next_node with a node offset from different device tree blob
@ 2016-12-23 21:09 Che-Liang Chiou
2016-12-26 5:24 ` Simon Glass
0 siblings, 1 reply; 2+ messages in thread
From: Che-Liang Chiou @ 2016-12-23 21:09 UTC (permalink / raw)
To: u-boot
Hi Simon,
I notice one thing that I am curious about. At v2016.11, in
lib/rsa/rsa-verify.c:rsa_verify function:
* The sig_node offset is computed from fdt_blob (at line 180):
sig_node = fdt_subnode_offset(blob, 0, FIT_SIG_NODENAME);
* At the end of the rsa_verify function, sig_node is applied to
info->fit to compute next offset (at line 210):
noffset = fdt_next_node(info->fit, sig_node, &ndepth);
blob (which is an alias of info->fdt_blob) and info->fit are two
different device tree blobs. And we probably should not call
fdt_next_node with offset from a different blob? (I'm not so sure
about fdt_next_node.)
Regards,
Che-Liang
^ permalink raw reply [flat|nested] 2+ messages in thread
* [U-Boot] rsa_verify calls fdt_next_node with a node offset from different device tree blob
2016-12-23 21:09 [U-Boot] rsa_verify calls fdt_next_node with a node offset from different device tree blob Che-Liang Chiou
@ 2016-12-26 5:24 ` Simon Glass
0 siblings, 0 replies; 2+ messages in thread
From: Simon Glass @ 2016-12-26 5:24 UTC (permalink / raw)
To: u-boot
Hi Che-Liang,
On 24 December 2016 at 10:09, Che-Liang Chiou <clchiou@gmail.com> wrote:
> Hi Simon,
>
> I notice one thing that I am curious about. At v2016.11, in
> lib/rsa/rsa-verify.c:rsa_verify function:
>
> * The sig_node offset is computed from fdt_blob (at line 180):
> sig_node = fdt_subnode_offset(blob, 0, FIT_SIG_NODENAME);
>
> * At the end of the rsa_verify function, sig_node is applied to
> info->fit to compute next offset (at line 210):
> noffset = fdt_next_node(info->fit, sig_node, &ndepth);
>
> blob (which is an alias of info->fdt_blob) and info->fit are two
> different device tree blobs. And we probably should not call
> fdt_next_node with offset from a different blob? (I'm not so sure
> about fdt_next_node.)
Nice to hear from you again!
Yes that looks wrong. I think we need a test to deal with the case
when the signature hint does not match.
Regards,
Simon
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-12-26 5:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-23 21:09 [U-Boot] rsa_verify calls fdt_next_node with a node offset from different device tree blob Che-Liang Chiou
2016-12-26 5:24 ` Simon Glass
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.