diff options
author | Paul Mackerras <paulus@samba.org> | 2006-06-07 02:15:39 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-06-09 07:24:16 -0400 |
commit | e9370ae15dc2f8ba1e1889ce26f13cda565b6ecb (patch) | |
tree | 338ed732f7a6607bc168795008e244f180876cda /arch/powerpc/kernel/traps.c | |
parent | fab5db97e44f76461f76b24adfa8ccb14d4df498 (diff) |
[PATCH] powerpc: Implement PR_[GS]ET_UNALIGN prctls for powerpc
This gives the ability to control whether alignment exceptions get
fixed up or reported to the process as a SIGBUS, using the existing
PR_SET_UNALIGN and PR_GET_UNALIGN prctls. We do not implement the
option of logging a message on alignment exceptions.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/traps.c')
-rw-r--r-- | arch/powerpc/kernel/traps.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 03def5715494..91a6e04d9741 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c | |||
@@ -805,9 +805,11 @@ void __kprobes program_check_exception(struct pt_regs *regs) | |||
805 | 805 | ||
806 | void alignment_exception(struct pt_regs *regs) | 806 | void alignment_exception(struct pt_regs *regs) |
807 | { | 807 | { |
808 | int fixed; | 808 | int fixed = 0; |
809 | 809 | ||
810 | fixed = fix_alignment(regs); | 810 | /* we don't implement logging of alignment exceptions */ |
811 | if (!(current->thread.align_ctl & PR_UNALIGN_SIGBUS)) | ||
812 | fixed = fix_alignment(regs); | ||
811 | 813 | ||
812 | if (fixed == 1) { | 814 | if (fixed == 1) { |
813 | regs->nip += 4; /* skip over emulated instruction */ | 815 | regs->nip += 4; /* skip over emulated instruction */ |