]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ARM: 7008/1: alignment: Make SIGBUS sent to userspace POSIXly correct
authorDave Martin <dave.martin@linaro.org>
Thu, 28 Jul 2011 13:29:40 +0000 (14:29 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 8 Aug 2011 08:38:08 +0000 (09:38 +0100)
commit3c424fa056d0fe1af0202c63406dbb8a12110c1e
tree4e13dd2abc790283b6a987bdbf8e9c37a339edc7
parent74da68a6c1ba1d39d6c51af3ab9da1db000cb79c
ARM: 7008/1: alignment: Make SIGBUS sent to userspace POSIXly correct

With the UM_SIGNAL alignment fault mode, no siginfo structure is
passed to userspace.

POSIX specifies how siginfo_t should be populated for alignment
faults, so this patch does just that:

  * si_signo = SIGBUS
  * si_code = BUS_ADRALN
  * si_addr = misaligned data address at which access was attempted

Signed-off-by: Dave Martin <dave.martin@linaro.org>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Acked-by: Kirill A. Shutemov <kirill@shutemov.name>
Reviewed-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mm/alignment.c