On Fri, 21 Nov 2025 17:17:37 +0100, Marek Vasut wrote:

> If CONFIG_OF_PLATDATA=y , then the udevice has no valid OF node associated
> with it and ofnode_valid(node) evaluates to 0. The dev_read_u32_default()
> call ultimately reaches ofnode_read_u32_index() which invokes fdt_getprop()
> and passes result of ofnode_to_offset(node) as an offset parameter into it.
> 
> The ofnode_to_offset(node) returns -1 for invalid node, which leads to an
> fdt_getprop(..., -1, ...) invocation, which will crash sandbox with SIGSEGV
> because libfdt can not handle negative node offsets without full tree check,
> which U-Boot inhibits to keep size lower.
> 
> [...]

Applied to u-boot/next, thanks!

[1/1] clk: fixed_rate: Avoid calling dev_read_*() if CONFIG_OF_PLATDATA=y
      commit: 3c43ca3025ef424a484101e265b8427e3a364303
-- 
Tom


Reply via email to