]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
LoongArch: Fix build errors for CONFIG_RANDSTRUCT
authorHuacai Chen <chenhuacai@loongson.cn>
Sat, 6 Dec 2025 02:39:40 +0000 (10:39 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Sat, 6 Dec 2025 02:39:40 +0000 (10:39 +0800)
commit3c250aecef62da81deb38ac6738ac0a88d91f1fc
treed9cc42f3537f94baebaca6494d5ab4fa1312489c
parent17fcc4bd7edcd74bae286754ac3a377c9886b3fd
LoongArch: Fix build errors for CONFIG_RANDSTRUCT

When CONFIG_RANDSTRUCT enabled, members of task_struct are randomized.
There is a chance that TASK_STACK_CANARY be out of 12bit immediate's
range and causes build errors. TASK_STACK_CANARY is naturally aligned,
so fix it by replacing ld.d/st.d with ldptr.d/stptr.d which have 14bit
immediates.

Cc: stable@vger.kernel.org
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202511240656.0NaPcJs1-lkp@intel.com/
Suggested-by: Rui Wang <wangrui@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/kernel/switch.S