On Tue, Jul 04, 2023 at 02:13:01PM -0300, Fabio Estevam wrote:
> On 04/07/2023 14:04, Francesco Dolcini wrote:
> 
> > The boards that do not check the return value might start to behave
> > wrongly without an obvious error to help the debugging.
> 
> Yes, the current implementation of fdt_status_disabled() is fragile, but
> there's not so much we can do for the upcoming 2023.07.
> 
> I can try to prepare a patch to improve it after 2023.07 is out next week.

It's also been fragile-as-designed since inception. The trigger here was
that renaming a ton of properties _reduced_ the overall dtb size itself
and so some edge cases got pushed over the edge. I'm honestly not sure
if it's better to:
- Give everyone a small padding by default
- Make the platforms which may call one of these functions a small
  padding by default
- Audit the callers and make them handle -FDT_ERR_NOSPACE like the other
  cases where we grow the dtb size do. Even if yes, many of those other
  cases are for non-trivial growth rather than just adding 4 more
  letters.
- Make fdt_set_node_status() handle the disabled case when out of space
  and grow/retry.

-- 
Tom

Attachment: signature.asc
Description: PGP signature

Reply via email to