Re: [PATCH v6 01/14] kexec: Fix CMA segment address translation with non-zero text_offset
From: Jinjie Ruan
Date: Tue Oct 20 2026 - 04:39:46 EST
在 2026/10/20 16:09, Mike Rapoport 写道:
>> kimage_load_cma_segment() and kimage_map_segment() both translate
>> a CMA segment using page_address(cma), which returns the CMA base
>> address. This ignores segment->mem.
>>
>> On arm64, image_load() adds text_offset to segment->mem before the
>> segment is loaded:
>>
>> kernel_segment->mem += text_offset;
>> kernel_segment->memsz -= text_offset;
>> image->start = kernel_segment->mem;
>
> That's true, but since commit 751c263bb74f ("arm64: remove TEXT_OFFSET
> randomization") TEXT_OFFSET is always zero. This is upstream from v5.8,
> so no LTS kernels has non-zero TEST_OFFSET.
Yes, My concern is what if the kdump kernel is an old one without this
patch?
Should we just add a WARN_ON_ONCE(text_offset != 0); here?
>
> Maybe we should rather start deprecating .text_offset in arm64?
>
--
Best regards,
Jinjie