* [PATCH] bootm: have bootm_open_fit return -ENOSYS if support missing
@ 2025-04-09 8:30 Ahmad Fatoum
2025-04-10 7:23 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2025-04-09 8:30 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
Otherwise, os_type will be determined unconditionally for the FIT image
buffer. As the buffer has zero size, this leads to an os_type of
filetype_unknown. The ARM32 support has an "ARM raw image" that matches
against filetype_unknown leading eventually to a crash trying to execute
the FIT image's FDT header.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
common/bootm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/bootm.c b/common/bootm.c
index 739be02fe571..a26ea82684a6 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -618,7 +618,7 @@ static int bootm_open_fit(struct image_data *data)
int ret;
if (!IS_ENABLED(CONFIG_FITIMAGE))
- return 0;
+ return -ENOSYS;
header = (struct fdt_header *)data->os_header;
flen = bootm_get_os_size(data);
--
2.39.5
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] bootm: have bootm_open_fit return -ENOSYS if support missing
2025-04-09 8:30 [PATCH] bootm: have bootm_open_fit return -ENOSYS if support missing Ahmad Fatoum
@ 2025-04-10 7:23 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2025-04-10 7:23 UTC (permalink / raw)
To: barebox, Ahmad Fatoum
On Wed, 09 Apr 2025 10:30:23 +0200, Ahmad Fatoum wrote:
> Otherwise, os_type will be determined unconditionally for the FIT image
> buffer. As the buffer has zero size, this leads to an os_type of
> filetype_unknown. The ARM32 support has an "ARM raw image" that matches
> against filetype_unknown leading eventually to a crash trying to execute
> the FIT image's FDT header.
>
>
> [...]
Applied, thanks!
[1/1] bootm: have bootm_open_fit return -ENOSYS if support missing
https://git.pengutronix.de/cgit/barebox/commit/?id=d562630b4d5f (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-04-10 8:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-09 8:30 [PATCH] bootm: have bootm_open_fit return -ENOSYS if support missing Ahmad Fatoum
2025-04-10 7:23 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox