[PATCH 1/3] dm: core: Check ofnode_to_offset() return value

Tom Rini trini at konsulko.com
Mon Nov 17 15:14:35 CET 2025


On Sun, Nov 16, 2025 at 10:28:28PM +0100, Marek Vasut wrote:
> On 11/16/25 3:13 PM, Tom Rini wrote:
> > On Sun, Nov 16, 2025 at 01:16:53AM +0100, Marek Vasut wrote:
> > > On 11/14/25 3:36 PM, Tom Rini wrote:
> > > 
> > > Hello Tom,
> > > 
> > > > > We would need a wrapper for almost every libfdt call, which isn't really
> > > > > better.
> > > > > 
> > > > > > What does fdt_getprop() return when the offset is -1 ?
> > > > > If can_assume(VALID_DTB) , then crash on NULL pointer dereference .
> > > > > If not, I think FDT_END (premature end) or an error code.
> > > > 
> > > > How are we now getting in this state is a question. Are we being passed
> > > > an unaligned DT and trying to work around/with it?
> > > This is superseded by:
> > > 
> > > [PATCH] xtensa: Assure end of U-Boot is at 8-byte aligned offset
> > > 
> > > It turns out the problem was yet another unaligned appended DT, on xtensa
> > > this time.
> > 
> > I wonder if we have still more places. I've seen patches in your series
> > for many but not all of
> > https://lore.kernel.org/all/20221215115825.827111-1-eugen.hristev@microchip.com/
> > and I don't recall how many of those were done individually instead
> > afterwards.
> Was there any reason why that patch (or subset of) was not picked up ?

It didn't get split up, and truncate isn't portable but later in the
thread we confirmed how to use dd in a way that is and does what's
required.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20251117/9b258d7e/attachment.sig>


More information about the U-Boot mailing list