hc
2024-11-01 2f529f9b558ca1c1bd74be7437a84e4711743404
kernel/include/linux/entry-common.h
....@@ -72,6 +72,14 @@
7272 _TIF_NEED_RESCHED | _TIF_PATCH_PENDING | _TIF_NOTIFY_SIGNAL | \
7373 ARCH_EXIT_TO_USER_MODE_WORK)
7474
75
+/*
76
+ * Status codes of syscall entry when Dovetail is enabled. Must not
77
+ * conflict with valid syscall numbers. And with -1 which seccomp uses
78
+ * to skip an syscall.
79
+ */
80
+#define EXIT_SYSCALL_OOB (-2)
81
+#define EXIT_SYSCALL_TAIL (-3)
82
+
7583 /**
7684 * arch_check_user_regs - Architecture specific sanity check for user mode regs
7785 * @regs: Pointer to currents pt_regs
....@@ -181,7 +189,7 @@
181189 #ifndef local_irq_enable_exit_to_user
182190 static inline void local_irq_enable_exit_to_user(unsigned long ti_work)
183191 {
184
- local_irq_enable();
192
+ local_irq_enable_full();
185193 }
186194 #endif
187195
....@@ -196,7 +204,7 @@
196204 #ifndef local_irq_disable_exit_to_user
197205 static inline void local_irq_disable_exit_to_user(void)
198206 {
199
- local_irq_disable();
207
+ local_irq_disable_full();
200208 }
201209 #endif
202210
....@@ -341,6 +349,12 @@
341349 */
342350 void irqentry_exit_to_user_mode(struct pt_regs *regs);
343351
352
+enum irqentry_info {
353
+ IRQENTRY_INBAND_UNSTALLED = 0,
354
+ IRQENTRY_INBAND_STALLED,
355
+ IRQENTRY_OOB,
356
+};
357
+
344358 #ifndef irqentry_state
345359 /**
346360 * struct irqentry_state - Opaque object for exception state storage
....@@ -348,6 +362,7 @@
348362 * exit path has to invoke rcu_irq_exit().
349363 * @lockdep: Used exclusively in the irqentry_nmi_*() calls; ensures that
350364 * lockdep state is restored correctly on exit from nmi.
365
+ * @stage_info: Information about pipeline state and current stage on IRQ entry.
351366 *
352367 * This opaque object is filled in by the irqentry_*_enter() functions and
353368 * must be passed back into the corresponding irqentry_*_exit() functions
....@@ -362,6 +377,9 @@
362377 bool exit_rcu;
363378 bool lockdep;
364379 };
380
+#ifdef CONFIG_IRQ_PIPELINE
381
+ enum irqentry_info stage_info;
382
+#endif
365383 } irqentry_state_t;
366384 #endif
367385