]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
LoongArch: Avoid initrd overlap during kernel relocation
authorWANG Rui <wangrui@loongson.cn>
Thu, 21 May 2026 12:58:36 +0000 (20:58 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Thu, 21 May 2026 12:58:36 +0000 (20:58 +0800)
commit5b710aa89343c5217889b7788e279565b36e0e5e
treefd97df3b34a6cc2b9df03ba765291e82badb95e7
parent08ade00fbb088b8f5a1af706ee970c26cf842bf0
LoongArch: Avoid initrd overlap during kernel relocation

Validate the relocation address against the initrd region specified via
"initrd=" or "initrdmem=" on the command line. Reject relocation targets
that overlap the initrd to prevent memory corruption during early boot.

Acked-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: WANG Rui <wangrui@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/kernel/relocate.c