On Sat, 27 Dec 2025 16:37:09 -0600, Tom Rini wrote:

> Hey all,
> 
> As seen by a number of patches fixing memory leaks, U-Boot has a problem
> with developer expectations around devm_kmalloc and friends. Namely,
> whereas in Linux these memory allocations will be freed automatically in
> most cases, in U-Boot this is only true if DEVRES is enabled. Now,
> intentionally, in xPL phases, we do not (and do not offer as an option)
> enabling DEVRES. However in full U-Boot this is left either to the user,
> or some drivers have select'd DEVRES on their own. This inconsistency is
> a problem. This series goes and deals with two small issues that were
> shown by having all drivers that use devm_.alloc to allocate memory also
> select DEVRES and then we make DEVRES no longer be a prompted option and
> instead select'd as needed. We do not make this unconditional as it
> would result in growing the resulting binary on the many platforms which
> have no users of the devm_.alloc family of functions.
> 
> [...]

Applied to u-boot/master, thanks!

[1/2] x86: Increase SYS_MALLOC_F_LEN to 0x1000
      commit: 284e1a00f4f28dcd6ddc8c860d22f1c8c427c5d5
[2/2] dm: core: Default to using DEVRES outside of xPL
      commit: 217cf656e249f698d390a7d8eaf255eb1a6c0230
-- 
Tom


Reply via email to