aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 8c216e057c94..a7c7698583bb 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1178,10 +1178,9 @@ struct task_struct {
1178 pid_t pid; 1178 pid_t pid;
1179 pid_t tgid; 1179 pid_t tgid;
1180 1180
1181#ifdef CONFIG_CC_STACKPROTECTOR
1182 /* Canary value for the -fstack-protector gcc feature */ 1181 /* Canary value for the -fstack-protector gcc feature */
1183 unsigned long stack_canary; 1182 unsigned long stack_canary;
1184#endif 1183
1185 /* 1184 /*
1186 * pointers to (original) parent process, youngest child, younger sibling, 1185 * pointers to (original) parent process, youngest child, younger sibling,
1187 * older sibling, respectively. (p->father can be replaced with 1186 * older sibling, respectively. (p->father can be replaced with
@@ -2087,6 +2086,19 @@ static inline int object_is_on_stack(void *obj)
2087 2086
2088extern void thread_info_cache_init(void); 2087extern void thread_info_cache_init(void);
2089 2088
2089#ifdef CONFIG_DEBUG_STACK_USAGE
2090static inline unsigned long stack_not_used(struct task_struct *p)
2091{
2092 unsigned long *n = end_of_stack(p);
2093
2094 do { /* Skip over canary */
2095 n++;
2096 } while (!*n);
2097
2098 return (unsigned long)n - (unsigned long)end_of_stack(p);
2099}
2100#endif
2101
2090/* set thread flags in other task's structures 2102/* set thread flags in other task's structures
2091 * - see asm/thread_info.h for TIF_xxxx flags available 2103 * - see asm/thread_info.h for TIF_xxxx flags available
2092 */ 2104 */