Re: [PATCH v8 4/6] kho: fix kho_in_debugfs_init() to handle non-FDT blobs
From: Pratyush Yadav
Date: Fri Mar 13 2026 - 05:23:46 EST
On Mon, Mar 09 2026, Breno Leitao wrote:
> kho_in_debugfs_init() has two problems when displaying incoming
> sub-blobs in debugfs:
>
> 1. It uses the hardcoded property name "fdt" instead of
> KHO_SUB_TREE_PROP_NAME ("preserved-data"), so it never finds
> subtrees stored by the current kho_add_subtree().
>
> 2. It calls fdt_totalsize() to determine blob sizes, which assumes
> all blobs are FDTs. This breaks for non-FDT blobs like struct
> kho_kexec_metadata.
>
> Fix both issues by using KHO_SUB_TREE_PROP_NAME to find subtrees
> and reading the "blob-size" property from the FDT (persisted by
> kho_add_subtree()) instead of calling fdt_totalsize().
>
> Signed-off-by: Breno Leitao <leitao@xxxxxxxxxx>
Reviewed-by: Pratyush Yadav <pratyush@xxxxxxxxxx>
[...]
--
Regards,
Pratyush Yadav