| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * arch/arm/include/asm/thread_info.h |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * 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. |
|---|
| 9 | 6 | */ |
|---|
| 10 | 7 | #ifndef __ASM_ARM_THREAD_INFO_H |
|---|
| 11 | 8 | #define __ASM_ARM_THREAD_INFO_H |
|---|
| .. | .. |
|---|
| 49 | 46 | struct thread_info { |
|---|
| 50 | 47 | unsigned long flags; /* low level flags */ |
|---|
| 51 | 48 | int preempt_count; /* 0 => preemptable, <0 => bug */ |
|---|
| 49 | + int preempt_lazy_count; /* 0 => preemptable, <0 => bug */ |
|---|
| 52 | 50 | mm_segment_t addr_limit; /* address limit */ |
|---|
| 53 | 51 | struct task_struct *task; /* main task structure */ |
|---|
| 54 | 52 | __u32 cpu; /* cpu */ |
|---|
| 55 | 53 | __u32 cpu_domain; /* cpu domain */ |
|---|
| 54 | +#ifdef CONFIG_STACKPROTECTOR_PER_TASK |
|---|
| 55 | + unsigned long stack_canary; |
|---|
| 56 | +#endif |
|---|
| 56 | 57 | struct cpu_context_save cpu_context; /* cpu context */ |
|---|
| 57 | 58 | __u32 syscall; /* syscall number */ |
|---|
| 58 | 59 | __u8 used_cp[16]; /* thread used copro */ |
|---|
| .. | .. |
|---|
| 74 | 75 | .preempt_count = INIT_PREEMPT_COUNT, \ |
|---|
| 75 | 76 | .addr_limit = KERNEL_DS, \ |
|---|
| 76 | 77 | } |
|---|
| 77 | | - |
|---|
| 78 | | -/* |
|---|
| 79 | | - * how to get the current stack pointer in C |
|---|
| 80 | | - */ |
|---|
| 81 | | -register unsigned long current_stack_pointer asm ("sp"); |
|---|
| 82 | 78 | |
|---|
| 83 | 79 | /* |
|---|
| 84 | 80 | * how to get the thread information struct from C |
|---|
| .. | .. |
|---|
| 131 | 127 | * thread information flags: |
|---|
| 132 | 128 | * TIF_USEDFPU - FPU was used by this task this quantum (SMP) |
|---|
| 133 | 129 | * TIF_POLLING_NRFLAG - true if poll_idle() is polling TIF_NEED_RESCHED |
|---|
| 130 | + * |
|---|
| 131 | + * Any bit in the range of 0..15 will cause do_work_pending() to be invoked. |
|---|
| 134 | 132 | */ |
|---|
| 135 | 133 | #define TIF_SIGPENDING 0 /* signal pending */ |
|---|
| 136 | 134 | #define TIF_NEED_RESCHED 1 /* rescheduling necessary */ |
|---|
| .. | .. |
|---|
| 140 | 138 | #define TIF_SYSCALL_AUDIT 5 /* syscall auditing active */ |
|---|
| 141 | 139 | #define TIF_SYSCALL_TRACEPOINT 6 /* syscall tracepoint instrumentation */ |
|---|
| 142 | 140 | #define TIF_SECCOMP 7 /* seccomp syscall filtering active */ |
|---|
| 141 | +#define TIF_NOTIFY_SIGNAL 8 /* signal notifications exist */ |
|---|
| 142 | +#define TIF_NEED_RESCHED_LAZY 9 |
|---|
| 143 | 143 | |
|---|
| 144 | | -#define TIF_NOHZ 12 /* in adaptive nohz mode */ |
|---|
| 145 | 144 | #define TIF_USING_IWMMXT 17 |
|---|
| 146 | 145 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ |
|---|
| 147 | 146 | #define TIF_RESTORE_SIGMASK 20 |
|---|
| .. | .. |
|---|
| 154 | 153 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) |
|---|
| 155 | 154 | #define _TIF_SYSCALL_TRACEPOINT (1 << TIF_SYSCALL_TRACEPOINT) |
|---|
| 156 | 155 | #define _TIF_SECCOMP (1 << TIF_SECCOMP) |
|---|
| 156 | +#define _TIF_NOTIFY_SIGNAL (1 << TIF_NOTIFY_SIGNAL) |
|---|
| 157 | +#define _TIF_NEED_RESCHED_LAZY (1 << TIF_NEED_RESCHED_LAZY) |
|---|
| 157 | 158 | #define _TIF_USING_IWMMXT (1 << TIF_USING_IWMMXT) |
|---|
| 158 | 159 | |
|---|
| 159 | 160 | /* Checks for any syscall work in entry-common.S */ |
|---|
| .. | .. |
|---|
| 164 | 165 | * Change these and you break ASM code in entry-common.S |
|---|
| 165 | 166 | */ |
|---|
| 166 | 167 | #define _TIF_WORK_MASK (_TIF_NEED_RESCHED | _TIF_SIGPENDING | \ |
|---|
| 167 | | - _TIF_NOTIFY_RESUME | _TIF_UPROBE) |
|---|
| 168 | + _TIF_NOTIFY_RESUME | _TIF_UPROBE | \ |
|---|
| 169 | + _TIF_NEED_RESCHED_LAZY | \ |
|---|
| 170 | + _TIF_NOTIFY_SIGNAL) |
|---|
| 168 | 171 | |
|---|
| 169 | 172 | #endif /* __KERNEL__ */ |
|---|
| 170 | 173 | #endif /* __ASM_ARM_THREAD_INFO_H */ |
|---|