diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2015-01-26 16:43:14 -0500 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2017-05-01 10:00:10 -0400 |
commit | 0700ed072feffd65212e6a03840d19c4988d6820 (patch) | |
tree | 4657a7f55cc926b3cc08806dcff6fa2613d5438f | |
parent | 1b47a683a04a93ad32786a23b7f88990b980346a (diff) |
xtensa: move internal ptrace definitions from uapi/asm to asm
Stack frame layout diagram, kernel stack size and exception_handlers
offsets are used by the kernel and are not supposed to be accessible to
userspace. Move these definitions from uapi/asm/ptrace.h to asm/ptrace.h
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
-rw-r--r-- | arch/xtensa/include/asm/ptrace.h | 39 | ||||
-rw-r--r-- | arch/xtensa/include/uapi/asm/ptrace.h | 40 |
2 files changed, 39 insertions, 40 deletions
diff --git a/arch/xtensa/include/asm/ptrace.h b/arch/xtensa/include/asm/ptrace.h index 598e752dcbcd..e2d9c5eb10bd 100644 --- a/arch/xtensa/include/asm/ptrace.h +++ b/arch/xtensa/include/asm/ptrace.h | |||
@@ -12,6 +12,45 @@ | |||
12 | 12 | ||
13 | #include <uapi/asm/ptrace.h> | 13 | #include <uapi/asm/ptrace.h> |
14 | 14 | ||
15 | /* | ||
16 | * Kernel stack | ||
17 | * | ||
18 | * +-----------------------+ -------- STACK_SIZE | ||
19 | * | register file | | | ||
20 | * +-----------------------+ | | ||
21 | * | struct pt_regs | | | ||
22 | * +-----------------------+ | ------ PT_REGS_OFFSET | ||
23 | * double : 16 bytes spill area : | ^ | ||
24 | * excetion :- - - - - - - - - - - -: | | | ||
25 | * frame : struct pt_regs : | | | ||
26 | * :- - - - - - - - - - - -: | | | ||
27 | * | | | | | ||
28 | * | memory stack | | | | ||
29 | * | | | | | ||
30 | * ~ ~ ~ ~ | ||
31 | * ~ ~ ~ ~ | ||
32 | * | | | | | ||
33 | * | | | | | ||
34 | * +-----------------------+ | | --- STACK_BIAS | ||
35 | * | struct task_struct | | | ^ | ||
36 | * current --> +-----------------------+ | | | | ||
37 | * | struct thread_info | | | | | ||
38 | * +-----------------------+ -------- | ||
39 | */ | ||
40 | |||
41 | #define KERNEL_STACK_SIZE (2 * PAGE_SIZE) | ||
42 | |||
43 | /* Offsets for exception_handlers[] (3 x 64-entries x 4-byte tables). */ | ||
44 | |||
45 | #define EXC_TABLE_KSTK 0x004 /* Kernel Stack */ | ||
46 | #define EXC_TABLE_DOUBLE_SAVE 0x008 /* Double exception save area for a0 */ | ||
47 | #define EXC_TABLE_FIXUP 0x00c /* Fixup handler */ | ||
48 | #define EXC_TABLE_PARAM 0x010 /* For passing a parameter to fixup */ | ||
49 | #define EXC_TABLE_SYSCALL_SAVE 0x014 /* For fast syscall handler */ | ||
50 | #define EXC_TABLE_FAST_USER 0x100 /* Fast user exception handler */ | ||
51 | #define EXC_TABLE_FAST_KERNEL 0x200 /* Fast kernel exception handler */ | ||
52 | #define EXC_TABLE_DEFAULT 0x300 /* Default C-Handler */ | ||
53 | #define EXC_TABLE_SIZE 0x400 | ||
15 | 54 | ||
16 | #ifndef __ASSEMBLY__ | 55 | #ifndef __ASSEMBLY__ |
17 | 56 | ||
diff --git a/arch/xtensa/include/uapi/asm/ptrace.h b/arch/xtensa/include/uapi/asm/ptrace.h index 6ccbd9e38e35..8853a0d544c8 100644 --- a/arch/xtensa/include/uapi/asm/ptrace.h +++ b/arch/xtensa/include/uapi/asm/ptrace.h | |||
@@ -11,46 +11,6 @@ | |||
11 | #ifndef _UAPI_XTENSA_PTRACE_H | 11 | #ifndef _UAPI_XTENSA_PTRACE_H |
12 | #define _UAPI_XTENSA_PTRACE_H | 12 | #define _UAPI_XTENSA_PTRACE_H |
13 | 13 | ||
14 | /* | ||
15 | * Kernel stack | ||
16 | * | ||
17 | * +-----------------------+ -------- STACK_SIZE | ||
18 | * | register file | | | ||
19 | * +-----------------------+ | | ||
20 | * | struct pt_regs | | | ||
21 | * +-----------------------+ | ------ PT_REGS_OFFSET | ||
22 | * double : 16 bytes spill area : | ^ | ||
23 | * excetion :- - - - - - - - - - - -: | | | ||
24 | * frame : struct pt_regs : | | | ||
25 | * :- - - - - - - - - - - -: | | | ||
26 | * | | | | | ||
27 | * | memory stack | | | | ||
28 | * | | | | | ||
29 | * ~ ~ ~ ~ | ||
30 | * ~ ~ ~ ~ | ||
31 | * | | | | | ||
32 | * | | | | | ||
33 | * +-----------------------+ | | --- STACK_BIAS | ||
34 | * | struct task_struct | | | ^ | ||
35 | * current --> +-----------------------+ | | | | ||
36 | * | struct thread_info | | | | | ||
37 | * +-----------------------+ -------- | ||
38 | */ | ||
39 | |||
40 | #define KERNEL_STACK_SIZE (2 * PAGE_SIZE) | ||
41 | |||
42 | /* Offsets for exception_handlers[] (3 x 64-entries x 4-byte tables). */ | ||
43 | |||
44 | #define EXC_TABLE_KSTK 0x004 /* Kernel Stack */ | ||
45 | #define EXC_TABLE_DOUBLE_SAVE 0x008 /* Double exception save area for a0 */ | ||
46 | #define EXC_TABLE_FIXUP 0x00c /* Fixup handler */ | ||
47 | #define EXC_TABLE_PARAM 0x010 /* For passing a parameter to fixup */ | ||
48 | #define EXC_TABLE_SYSCALL_SAVE 0x014 /* For fast syscall handler */ | ||
49 | #define EXC_TABLE_FAST_USER 0x100 /* Fast user exception handler */ | ||
50 | #define EXC_TABLE_FAST_KERNEL 0x200 /* Fast kernel exception handler */ | ||
51 | #define EXC_TABLE_DEFAULT 0x300 /* Default C-Handler */ | ||
52 | #define EXC_TABLE_SIZE 0x400 | ||
53 | |||
54 | /* Registers used by strace */ | 14 | /* Registers used by strace */ |
55 | 15 | ||
56 | #define REG_A_BASE 0x0000 | 16 | #define REG_A_BASE 0x0000 |