]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
LoongArch: Increase TASK_STRUCT_OFFSET up to 2040 for 32BIT
authorHuacai Chen <chenhuacai@loongson.cn>
Thu, 23 Jul 2026 14:27:15 +0000 (22:27 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Thu, 23 Jul 2026 14:27:15 +0000 (22:27 +0800)
THREAD_INFO_IN_TASK increase the size of task_struct, which casuses a
build error for the 32BIT kernel if RANDSTRUCT is enabled. So increase
TASK_STRUCT_OFFSET as big as possible (2040), but can still be aligned
and be fit in the addi.w instruction.

Cc: stable@vger.kernel.org
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/include/asm/asmmacro.h

index a648be5f723fcb14ff9d866bae5164dc1e049e21..b7423d1ac56842899824463efceadbaa30c633bc 100644 (file)
@@ -14,7 +14,7 @@
 #ifdef CONFIG_64BIT
 #define TASK_STRUCT_OFFSET 0
 #else
-#define TASK_STRUCT_OFFSET 2000
+#define TASK_STRUCT_OFFSET 2040
 #endif
 
        .macro  cpu_save_nonscratch thread