[PATCH 0/4] spl: atf: Fix potential bug on getting FIT data
Massimo Pegorer
massimo.pegorer+oss at gmail.com
Sat Sep 16 10:22:42 CEST 2023
If both fit_image_get_entry() and fit_image_get_load() calls fail,
an uninitialized variable value is passed to TF-A as BL3-2 and/or
BL3-3 entry point in spl_invoke_atf().
In real world of current SPL flow this is not expected to occur
because a fit_image_get_load() failure should break boot during
images loading phase, and thus before entering spl_invoke_atf().
Update improve and fix comments.
A minor rework slightly reduces SPL code size up to 72 bytes.
Note: I am not enough confident about uintptr_t and ulong sizes
matching within all architectures, otherwise straightforward pass
of bl3x_entry reference to fit_image_get_xxx would be fine.
Massimo Pegorer (4):
spl: atf: Improve comments and code readability
image: fit: Improve functions description comments
spl: atf: Fix potential but not occurring bug
spl: atf: Reduce SPL code size
boot/image-fit.c | 12 +++----
common/spl/spl_atf.c | 75 +++++++++++++++++++-------------------------
2 files changed, 38 insertions(+), 49 deletions(-)
--
2.34.1
More information about the U-Boot
mailing list