Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

arch: remove ARCH_TASK_STRUCT_ALLOCATOR

IA-64 was the only architecture which selected ARCH_TASK_STRUCT_ALLOCATOR.
IA-64 was removed with commit cf8e8658100d ("arch: Remove Itanium (IA-64)
architecture"). Therefore remove support for ARCH_THREAD_STACK_ALLOCATOR
as well.

Link: https://lkml.kernel.org/r/20231116133638.1636277-3-hca@linux.ibm.com
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Heiko Carstens and committed by
Andrew Morton
3888750e f72709ab

-11
-5
arch/Kconfig
··· 305 305 config ARCH_TASK_STRUCT_ON_STACK 306 306 bool 307 307 308 - # Select if arch has its private alloc_task_struct() function 309 - config ARCH_TASK_STRUCT_ALLOCATOR 310 - bool 311 - 312 308 config HAVE_ARCH_THREAD_STRUCT_WHITELIST 313 309 bool 314 - depends on !ARCH_TASK_STRUCT_ALLOCATOR 315 310 help 316 311 An architecture should select this to provide hardened usercopy 317 312 knowledge about what region of the thread_struct should be
-6
kernel/fork.c
··· 165 165 { 166 166 } 167 167 168 - #ifndef CONFIG_ARCH_TASK_STRUCT_ALLOCATOR 169 168 static struct kmem_cache *task_struct_cachep; 170 169 171 170 static inline struct task_struct *alloc_task_struct_node(int node) ··· 176 177 { 177 178 kmem_cache_free(task_struct_cachep, tsk); 178 179 } 179 - #endif 180 180 181 181 /* 182 182 * Allocate pages if THREAD_SIZE is >= PAGE_SIZE, otherwise use a ··· 999 1001 int arch_task_struct_size __read_mostly; 1000 1002 #endif 1001 1003 1002 - #ifndef CONFIG_ARCH_TASK_STRUCT_ALLOCATOR 1003 1004 static void task_struct_whitelist(unsigned long *offset, unsigned long *size) 1004 1005 { 1005 1006 /* Fetch thread_struct whitelist for the architecture. */ ··· 1013 1016 else 1014 1017 *offset += offsetof(struct task_struct, thread); 1015 1018 } 1016 - #endif /* CONFIG_ARCH_TASK_STRUCT_ALLOCATOR */ 1017 1019 1018 1020 void __init fork_init(void) 1019 1021 { 1020 1022 int i; 1021 - #ifndef CONFIG_ARCH_TASK_STRUCT_ALLOCATOR 1022 1023 #ifndef ARCH_MIN_TASKALIGN 1023 1024 #define ARCH_MIN_TASKALIGN 0 1024 1025 #endif ··· 1029 1034 arch_task_struct_size, align, 1030 1035 SLAB_PANIC|SLAB_ACCOUNT, 1031 1036 useroffset, usersize, NULL); 1032 - #endif 1033 1037 1034 1038 /* do the arch specific task caches init */ 1035 1039 arch_task_cache_init();