diff options
author | Nicolas Pitre <nico@cam.org> | 2006-01-14 11:18:08 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-01-14 11:18:08 -0500 |
commit | 2dede2d8e925f4c2cb4e136b14df127685e15dd3 (patch) | |
tree | 271b3fb300c5ac143556295d10c6736430ebed85 /include | |
parent | da2b1cd61903c8e9796e76be2d606584f26a78e5 (diff) |
[ARM] 3102/1: ARM EABI: stack pointer must be 64-bit aligned after a CPU exception
Patch from Nicolas Pitre
The ARM EABI says that the stack pointer has to be 64-bit aligned for
reasons already mentioned in patch #3101 when calling C functions.
We therefore must verify and adjust sp accordingly when taking an
exception from kernel mode since sp might not necessarily be 64-bit
aligned if the exception occurs in the middle of a kernel function.
If the exception occurs while in user mode then no sp fixup is needed as
long as sizeof(struct pt_regs) as well as any additional syscall data
stack space remain multiples of 8.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-arm/ptrace.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/asm-arm/ptrace.h b/include/asm-arm/ptrace.h index 4377e22b7e1a..f40948d54448 100644 --- a/include/asm-arm/ptrace.h +++ b/include/asm-arm/ptrace.h | |||
@@ -60,9 +60,11 @@ | |||
60 | 60 | ||
61 | #ifndef __ASSEMBLY__ | 61 | #ifndef __ASSEMBLY__ |
62 | 62 | ||
63 | /* this struct defines the way the registers are stored on the | 63 | /* |
64 | stack during a system call. */ | 64 | * This struct defines the way the registers are stored on the |
65 | 65 | * stack during a system call. Note that sizeof(struct pt_regs) | |
66 | * has to be a multiple of 8. | ||
67 | */ | ||
66 | struct pt_regs { | 68 | struct pt_regs { |
67 | long uregs[18]; | 69 | long uregs[18]; |
68 | }; | 70 | }; |