hc
2024-11-01 2f529f9b558ca1c1bd74be7437a84e4711743404
kernel/arch/arm64/include/asm/thread_info.h
....@@ -14,6 +14,7 @@
1414
1515 struct task_struct;
1616
17
+#include <dovetail/thread_info.h>
1718 #include <asm/memory.h>
1819 #include <asm/stack_pointer.h>
1920 #include <asm/types.h>
....@@ -25,6 +26,7 @@
2526 */
2627 struct thread_info {
2728 unsigned long flags; /* low level flags */
29
+ unsigned long local_flags; /* local (synchronous) flags */
2830 mm_segment_t addr_limit; /* address limit */
2931 #ifdef CONFIG_ARM64_SW_TTBR0_PAN
3032 u64 ttbr0; /* saved TTBR0_EL1 */
....@@ -45,6 +47,7 @@
4547 void *scs_base;
4648 void *scs_sp;
4749 #endif
50
+ struct oob_thread_state oob_state;
4851 };
4952
5053 #define thread_saved_pc(tsk) \
....@@ -59,6 +62,8 @@
5962
6063 void arch_release_task_struct(struct task_struct *tsk);
6164
65
+#define ti_local_flags(__ti) ((__ti)->local_flags)
66
+
6267 #endif
6368
6469 #define TIF_SIGPENDING 0 /* signal pending */
....@@ -69,11 +74,12 @@
6974 #define TIF_FSCHECK 5 /* Check FS is USER_DS on return */
7075 #define TIF_MTE_ASYNC_FAULT 6 /* MTE Asynchronous Tag Check Fault */
7176 #define TIF_NOTIFY_SIGNAL 7 /* signal notifications exist */
72
-#define TIF_SYSCALL_TRACE 8 /* syscall trace active */
77
+#define TIF_SYSCALL_TRACE 13 /* syscall trace active */
7378 #define TIF_SYSCALL_AUDIT 9 /* syscall auditing */
7479 #define TIF_SYSCALL_TRACEPOINT 10 /* syscall tracepoint for ftrace */
7580 #define TIF_SECCOMP 11 /* syscall secure computing */
7681 #define TIF_SYSCALL_EMU 12 /* syscall emulation active */
82
+#define TIF_RETUSER 8 /* INBAND_TASK_RETUSER is pending */
7783 #define TIF_MEMDIE 18 /* is terminating due to OOM killer */
7884 #define TIF_FREEZE 19
7985 #define TIF_RESTORE_SIGMASK 20
....@@ -83,6 +89,7 @@
8389 #define TIF_SVE_VL_INHERIT 24 /* Inherit sve_vl_onexec across exec */
8490 #define TIF_SSBD 25 /* Wants SSB mitigation */
8591 #define TIF_TAGGED_ADDR 26 /* Allow tagged user addresses */
92
+#define TIF_MAYDAY 27 /* Emergency trap pending */
8693
8794 #define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
8895 #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
....@@ -100,11 +107,13 @@
100107 #define _TIF_SVE (1 << TIF_SVE)
101108 #define _TIF_MTE_ASYNC_FAULT (1 << TIF_MTE_ASYNC_FAULT)
102109 #define _TIF_NOTIFY_SIGNAL (1 << TIF_NOTIFY_SIGNAL)
110
+#define _TIF_MAYDAY (1 << TIF_MAYDAY)
111
+#define _TIF_RETUSER (1 << TIF_RETUSER)
103112
104113 #define _TIF_WORK_MASK (_TIF_NEED_RESCHED | _TIF_SIGPENDING | \
105114 _TIF_NOTIFY_RESUME | _TIF_FOREIGN_FPSTATE | \
106115 _TIF_UPROBE | _TIF_FSCHECK | _TIF_MTE_ASYNC_FAULT | \
107
- _TIF_NOTIFY_SIGNAL)
116
+ _TIF_NOTIFY_SIGNAL | _TIF_RETUSER)
108117
109118 #define _TIF_SYSCALL_WORK (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | \
110119 _TIF_SYSCALL_TRACEPOINT | _TIF_SECCOMP | \
....@@ -126,4 +135,12 @@
126135 INIT_SCS \
127136 }
128137
138
+/*
139
+ * Local (synchronous) thread flags.
140
+ */
141
+#define _TLF_OOB 0x0001
142
+#define _TLF_DOVETAIL 0x0002
143
+#define _TLF_OFFSTAGE 0x0004
144
+#define _TLF_OOBTRAP 0x0008
145
+
129146 #endif /* __ASM_THREAD_INFO_H */