Skip to content

Commit

Permalink
ARM: 6252/1: Use SIGBUS for unaligned access instead of SIGILL
Browse files Browse the repository at this point in the history
POSIX specify to use signal SIGBUS with code BUS_ADRALN for invalid
address alignment.

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Kirill A. Shutemov authored and Russell King committed Jul 27, 2010
1 parent c1ba6ba commit 3dc91af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions arch/arm/mm/alignment.c
Original file line number Diff line number Diff line change
Expand Up @@ -924,8 +924,8 @@ static int __init alignment_init(void)
ai_usermode = UM_FIXUP;
}

hook_fault_code(1, do_alignment, SIGILL, "alignment exception");
hook_fault_code(3, do_alignment, SIGILL, "alignment exception");
hook_fault_code(1, do_alignment, SIGBUS, "alignment exception");
hook_fault_code(3, do_alignment, SIGBUS, "alignment exception");

return 0;
}
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,9 +463,9 @@ static struct fsr_info {
* defines these to be "precise" aborts.
*/
{ do_bad, SIGSEGV, 0, "vector exception" },
{ do_bad, SIGILL, BUS_ADRALN, "alignment exception" },
{ do_bad, SIGBUS, BUS_ADRALN, "alignment exception" },
{ do_bad, SIGKILL, 0, "terminal exception" },
{ do_bad, SIGILL, BUS_ADRALN, "alignment exception" },
{ do_bad, SIGBUS, BUS_ADRALN, "alignment exception" },
/* Do we need runtime check ? */
#if __LINUX_ARM_ARCH__ < 6
{ do_bad, SIGBUS, 0, "external abort on linefetch" },
Expand Down

0 comments on commit 3dc91af

Please sign in to comment.