[PATCH v6 01/14] kexec: Fix CMA segment address translation with non-zero text_offset

Jinjie Ruan ruanjinjie at huawei.com
Tue Oct 20 01:42:37 PDT 2026



在 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.
> 
> Maybe we should rather start deprecating .text_offset in arm64?

I completely agree. This will save us from a lot of unnecessary changes.

> 

-- 
Best regards,
Jinjie




More information about the kexec mailing list