init_task.c (9b031c86506cef9acae45e61339fcf9deaabb793) | init_task.c (b75058614fdd3140074a640b514f6a0b4d485a2d) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2#include <linux/init_task.h> 3#include <linux/export.h> 4#include <linux/mqueue.h> 5#include <linux/sched.h> 6#include <linux/sched/sysctl.h> 7#include <linux/sched/rt.h> 8#include <linux/sched/task.h> 9#include <linux/init.h> 10#include <linux/fs.h> 11#include <linux/mm.h> 12#include <linux/audit.h> 13#include <linux/numa.h> | 1// SPDX-License-Identifier: GPL-2.0 2#include <linux/init_task.h> 3#include <linux/export.h> 4#include <linux/mqueue.h> 5#include <linux/sched.h> 6#include <linux/sched/sysctl.h> 7#include <linux/sched/rt.h> 8#include <linux/sched/task.h> 9#include <linux/init.h> 10#include <linux/fs.h> 11#include <linux/mm.h> 12#include <linux/audit.h> 13#include <linux/numa.h> |
14#include <linux/scs.h> |
|
14 | 15 |
15#include <asm/pgtable.h> | |
16#include <linux/uaccess.h> 17 18static struct signal_struct init_signals = { 19 .nr_threads = 1, 20 .thread_head = LIST_HEAD_INIT(init_task.thread_node), 21 .wait_chldexit = __WAIT_QUEUE_HEAD_INITIALIZER(init_signals.wait_chldexit), 22 .shared_pending = { 23 .list = LIST_HEAD_INIT(init_signals.shared_pending.list), --- 21 unchanged lines hidden (view full) --- 45 46static struct sighand_struct init_sighand = { 47 .count = REFCOUNT_INIT(1), 48 .action = { { { .sa_handler = SIG_DFL, } }, }, 49 .siglock = __SPIN_LOCK_UNLOCKED(init_sighand.siglock), 50 .signalfd_wqh = __WAIT_QUEUE_HEAD_INITIALIZER(init_sighand.signalfd_wqh), 51}; 52 | 16#include <linux/uaccess.h> 17 18static struct signal_struct init_signals = { 19 .nr_threads = 1, 20 .thread_head = LIST_HEAD_INIT(init_task.thread_node), 21 .wait_chldexit = __WAIT_QUEUE_HEAD_INITIALIZER(init_signals.wait_chldexit), 22 .shared_pending = { 23 .list = LIST_HEAD_INIT(init_signals.shared_pending.list), --- 21 unchanged lines hidden (view full) --- 45 46static struct sighand_struct init_sighand = { 47 .count = REFCOUNT_INIT(1), 48 .action = { { { .sa_handler = SIG_DFL, } }, }, 49 .siglock = __SPIN_LOCK_UNLOCKED(init_sighand.siglock), 50 .signalfd_wqh = __WAIT_QUEUE_HEAD_INITIALIZER(init_sighand.signalfd_wqh), 51}; 52 |
53#ifdef CONFIG_SHADOW_CALL_STACK 54unsigned long init_shadow_call_stack[SCS_SIZE / sizeof(long)] 55 __init_task_data = { 56 [(SCS_SIZE / sizeof(long)) - 1] = SCS_END_MAGIC 57}; 58#endif 59 |
|
53/* 54 * Set up the first task table, touch at your own risk!. Base=0, 55 * limit=0x1fffff (=2MB) 56 */ 57struct task_struct init_task 58#ifdef CONFIG_ARCH_TASK_STRUCT_ON_STACK 59 __init_task_data 60#endif --- 75 unchanged lines hidden (view full) --- 136 .rcu_node_entry = LIST_HEAD_INIT(init_task.rcu_node_entry), 137 .rcu_blocked_node = NULL, 138#endif 139#ifdef CONFIG_TASKS_RCU 140 .rcu_tasks_holdout = false, 141 .rcu_tasks_holdout_list = LIST_HEAD_INIT(init_task.rcu_tasks_holdout_list), 142 .rcu_tasks_idle_cpu = -1, 143#endif | 60/* 61 * Set up the first task table, touch at your own risk!. Base=0, 62 * limit=0x1fffff (=2MB) 63 */ 64struct task_struct init_task 65#ifdef CONFIG_ARCH_TASK_STRUCT_ON_STACK 66 __init_task_data 67#endif --- 75 unchanged lines hidden (view full) --- 143 .rcu_node_entry = LIST_HEAD_INIT(init_task.rcu_node_entry), 144 .rcu_blocked_node = NULL, 145#endif 146#ifdef CONFIG_TASKS_RCU 147 .rcu_tasks_holdout = false, 148 .rcu_tasks_holdout_list = LIST_HEAD_INIT(init_task.rcu_tasks_holdout_list), 149 .rcu_tasks_idle_cpu = -1, 150#endif |
151#ifdef CONFIG_TASKS_TRACE_RCU 152 .trc_reader_nesting = 0, 153 .trc_reader_special.s = 0, 154 .trc_holdout_list = LIST_HEAD_INIT(init_task.trc_holdout_list), 155#endif |
|
144#ifdef CONFIG_CPUSETS | 156#ifdef CONFIG_CPUSETS |
145 .mems_allowed_seq = SEQCNT_ZERO(init_task.mems_allowed_seq), | 157 .mems_allowed_seq = SEQCNT_SPINLOCK_ZERO(init_task.mems_allowed_seq, 158 &init_task.alloc_lock), |
146#endif 147#ifdef CONFIG_RT_MUTEXES 148 .pi_waiters = RB_ROOT_CACHED, 149 .pi_top_task = NULL, 150#endif 151 INIT_PREV_CPUTIME(init_task) 152#ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN 153 .vtime.seqcount = SEQCNT_ZERO(init_task.vtime_seqcount), 154 .vtime.starttime = 0, 155 .vtime.state = VTIME_SYS, 156#endif 157#ifdef CONFIG_NUMA_BALANCING 158 .numa_preferred_nid = NUMA_NO_NODE, 159 .numa_group = NULL, 160 .numa_faults = NULL, 161#endif 162#ifdef CONFIG_KASAN 163 .kasan_depth = 1, 164#endif | 159#endif 160#ifdef CONFIG_RT_MUTEXES 161 .pi_waiters = RB_ROOT_CACHED, 162 .pi_top_task = NULL, 163#endif 164 INIT_PREV_CPUTIME(init_task) 165#ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN 166 .vtime.seqcount = SEQCNT_ZERO(init_task.vtime_seqcount), 167 .vtime.starttime = 0, 168 .vtime.state = VTIME_SYS, 169#endif 170#ifdef CONFIG_NUMA_BALANCING 171 .numa_preferred_nid = NUMA_NO_NODE, 172 .numa_group = NULL, 173 .numa_faults = NULL, 174#endif 175#ifdef CONFIG_KASAN 176 .kasan_depth = 1, 177#endif |
178#ifdef CONFIG_KCSAN 179 .kcsan_ctx = { 180 .disable_count = 0, 181 .atomic_next = 0, 182 .atomic_nest_count = 0, 183 .in_flat_atomic = false, 184 .access_mask = 0, 185 .scoped_accesses = {LIST_POISON1, NULL}, 186 }, 187#endif |
|
165#ifdef CONFIG_TRACE_IRQFLAGS 166 .softirqs_enabled = 1, 167#endif 168#ifdef CONFIG_LOCKDEP 169 .lockdep_depth = 0, /* no locks held yet */ 170 .curr_chain_key = INITIAL_CHAIN_KEY, 171 .lockdep_recursion = 0, 172#endif --- 22 unchanged lines hidden --- | 188#ifdef CONFIG_TRACE_IRQFLAGS 189 .softirqs_enabled = 1, 190#endif 191#ifdef CONFIG_LOCKDEP 192 .lockdep_depth = 0, /* no locks held yet */ 193 .curr_chain_key = INITIAL_CHAIN_KEY, 194 .lockdep_recursion = 0, 195#endif --- 22 unchanged lines hidden --- |