hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/arch/arm/include/asm/thread_info.h
....@@ -1,11 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * arch/arm/include/asm/thread_info.h
34 *
45 * Copyright (C) 2002 Russell King.
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License version 2 as
8
- * published by the Free Software Foundation.
96 */
107 #ifndef __ASM_ARM_THREAD_INFO_H
118 #define __ASM_ARM_THREAD_INFO_H
....@@ -53,6 +50,9 @@
5350 struct task_struct *task; /* main task structure */
5451 __u32 cpu; /* cpu */
5552 __u32 cpu_domain; /* cpu domain */
53
+#ifdef CONFIG_STACKPROTECTOR_PER_TASK
54
+ unsigned long stack_canary;
55
+#endif
5656 struct cpu_context_save cpu_context; /* cpu context */
5757 __u32 syscall; /* syscall number */
5858 __u8 used_cp[16]; /* thread used copro */
....@@ -74,11 +74,6 @@
7474 .preempt_count = INIT_PREEMPT_COUNT, \
7575 .addr_limit = KERNEL_DS, \
7676 }
77
-
78
-/*
79
- * how to get the current stack pointer in C
80
- */
81
-register unsigned long current_stack_pointer asm ("sp");
8277
8378 /*
8479 * how to get the thread information struct from C
....@@ -131,6 +126,8 @@
131126 * thread information flags:
132127 * TIF_USEDFPU - FPU was used by this task this quantum (SMP)
133128 * TIF_POLLING_NRFLAG - true if poll_idle() is polling TIF_NEED_RESCHED
129
+ *
130
+ * Any bit in the range of 0..15 will cause do_work_pending() to be invoked.
134131 */
135132 #define TIF_SIGPENDING 0 /* signal pending */
136133 #define TIF_NEED_RESCHED 1 /* rescheduling necessary */
....@@ -140,8 +137,8 @@
140137 #define TIF_SYSCALL_AUDIT 5 /* syscall auditing active */
141138 #define TIF_SYSCALL_TRACEPOINT 6 /* syscall tracepoint instrumentation */
142139 #define TIF_SECCOMP 7 /* seccomp syscall filtering active */
140
+#define TIF_NOTIFY_SIGNAL 8 /* signal notifications exist */
143141
144
-#define TIF_NOHZ 12 /* in adaptive nohz mode */
145142 #define TIF_USING_IWMMXT 17
146143 #define TIF_MEMDIE 18 /* is terminating due to OOM killer */
147144 #define TIF_RESTORE_SIGMASK 20
....@@ -154,6 +151,7 @@
154151 #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)
155152 #define _TIF_SYSCALL_TRACEPOINT (1 << TIF_SYSCALL_TRACEPOINT)
156153 #define _TIF_SECCOMP (1 << TIF_SECCOMP)
154
+#define _TIF_NOTIFY_SIGNAL (1 << TIF_NOTIFY_SIGNAL)
157155 #define _TIF_USING_IWMMXT (1 << TIF_USING_IWMMXT)
158156
159157 /* Checks for any syscall work in entry-common.S */
....@@ -164,7 +162,8 @@
164162 * Change these and you break ASM code in entry-common.S
165163 */
166164 #define _TIF_WORK_MASK (_TIF_NEED_RESCHED | _TIF_SIGPENDING | \
167
- _TIF_NOTIFY_RESUME | _TIF_UPROBE)
165
+ _TIF_NOTIFY_RESUME | _TIF_UPROBE | \
166
+ _TIF_NOTIFY_SIGNAL)
168167
169168 #endif /* __KERNEL__ */
170169 #endif /* __ASM_ARM_THREAD_INFO_H */