[PATCH v2] ARM: alignment: Make SIGBUS sent to userspace POSIXly correct
Kirill A. Shutemov
kirill at shutemov.name
Thu Jul 28 07:17:02 EDT 2011
On Wed, Jul 27, 2011 at 01:10:36PM +0100, Dave Martin wrote:
> 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 at linaro.org>
> ---
> v2: si_addr in siginfo_t changed to contain the faulting data
> access address, not the address of the faulting instruction.
>
> This behaviour is consistent with the way other fault signals
> such as SIGSEGV are already reported, as well as matching the
> apparent intent of the POSIX sigaction interface.
Acked-by: Kirill A. Shutemov <kirill at shutemov.name>
--
Kirill A. Shutemov
More information about the linux-arm-kernel
mailing list