[PATCH] arm64/alternatives: use subsections for replacement sequences

Will Deacon will at kernel.org
Thu Jul 2 09:54:35 EDT 2020


On Tue, 30 Jun 2020 10:19:21 +0200, Ard Biesheuvel wrote:
> When building very large kernels, the logic that emits replacement
> sequences for alternatives fails when relative branches are present
> in the code that is emitted into the .altinstr_replacement section
> and patched in at the original site and fixed up. The reason is that
> the linker will insert veneers if relative branches go out of range,
> and due to the relative distance of the .altinstr_replacement from
> the .text section where its branch targets usually live, veneers
> may be emitted at the end of the .altinstr_replacement section, with
> the relative branches in the sequence pointed at the veneers instead
> of the actual target.
> 
> [...]

Applied to arm64 (for-next/fixes), thanks!

[1/1] arm64/alternatives: use subsections for replacement sequences
      https://git.kernel.org/arm64/c/f7b93d42945c

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev



More information about the linux-arm-kernel mailing list