On Mon, Oct 12, 2026 at 03:46:04PM -0600, Sebastian Alba Vives wrote:
> spl_invoke_opensbi() takes the next-stage entry point from a
> /fit-images node with fit_image_get_entry(), falling back to
> fit_image_get_load(). fit_image_get_address() returns -1 without
> assigning the caller's ulong, both when the property is absent and
> when the address does not fit in a target ulong, so os_entry stays
> uninitialised when a node has neither property.
>
> ret was not tested after the fallback, so that uninitialised stack
> value became opensbi_info.next_addr, the address OpenSBI jumps to when
> it hands control to S-mode.
>
> spl_opensbi_find_os_node() selects the first /fit-images subnode whose
> os property matches the requested type and does not require an entry
> or load property, so such a node is reachable.
>
> Fail the boot instead, matching how the rest of the function handles a
> device tree it cannot use.
>
> Fixes: caa7fc2c5775 ("spl: Use standard FIT entries")
> Signed-off-by: Sebastian Alba Vives <[email protected]>
Reviewed-by: Yao Zi <[email protected]>
> ---
> common/spl/spl_opensbi.c | 5 +++++
> 1 file changed, 5 insertions(+)
Thanks,
Yao Zi