]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - include/linux/stacktrace.h
Revert "UBUNTU: SAUCE: LSM stacking: LSM: Infrastructure management of the remaining...
[mirror_ubuntu-artful-kernel.git] / include / linux / stacktrace.h
1 #ifndef __LINUX_STACKTRACE_H
2 #define __LINUX_STACKTRACE_H
3
4 #include <linux/types.h>
5
6 struct task_struct;
7 struct pt_regs;
8
9 #ifdef CONFIG_STACKTRACE
10 struct stack_trace {
11 unsigned int nr_entries, max_entries;
12 unsigned long *entries;
13 int skip; /* input argument: How many entries to skip */
14 };
15
16 extern void save_stack_trace(struct stack_trace *trace);
17 extern void save_stack_trace_regs(struct pt_regs *regs,
18 struct stack_trace *trace);
19 extern void save_stack_trace_tsk(struct task_struct *tsk,
20 struct stack_trace *trace);
21 extern int save_stack_trace_tsk_reliable(struct task_struct *tsk,
22 struct stack_trace *trace);
23
24 extern void print_stack_trace(struct stack_trace *trace, int spaces);
25 extern int snprint_stack_trace(char *buf, size_t size,
26 struct stack_trace *trace, int spaces);
27
28 #ifdef CONFIG_USER_STACKTRACE_SUPPORT
29 extern void save_stack_trace_user(struct stack_trace *trace);
30 #else
31 # define save_stack_trace_user(trace) do { } while (0)
32 #endif
33
34 #else /* !CONFIG_STACKTRACE */
35 # define save_stack_trace(trace) do { } while (0)
36 # define save_stack_trace_tsk(tsk, trace) do { } while (0)
37 # define save_stack_trace_user(trace) do { } while (0)
38 # define print_stack_trace(trace, spaces) do { } while (0)
39 # define snprint_stack_trace(buf, size, trace, spaces) do { } while (0)
40 # define save_stack_trace_tsk_reliable(tsk, trace) ({ -ENOSYS; })
41 #endif /* CONFIG_STACKTRACE */
42
43 #endif /* __LINUX_STACKTRACE_H */