Re: [PATCH v6 02/14] kexec: Record allocated CMA pages to fix release size mismatch
From: Mike Rapoport
Date: Tue Oct 20 2026 - 04:16:01 EST
> The CMA pages allocated for a kexec segment are released using the
> segment's memsz to calculate the number of pages. However, some
> architecture loaders modify the segment's memsz after allocation
> (e.g. arm64 subtracts text_offset), causing the release function to
> free fewer pages than were originally allocated, leaking the remaining
> CMA pages.
Like in the previous patch, arm64 essentially subtracts zero for any
kernel newer than v5.8, so deprecating .text_offset in arm64 seems to me
a better solution.
--
Sincerely yours,
Mike.