Skip to content
Commit 09a6adf5 authored by Victor Kamensky's avatar Victor Kamensky Committed by Will Deacon
Browse files

arm64: mm: unaligned access by user-land should be received as SIGBUS



After 52d7523d (arm64: mm: allow the kernel to handle alignment faults on
user accesses) commit user-land accesses that produce unaligned exceptions
like in case of aarch32 ldm/stm/ldrd/strd instructions operating on
unaligned memory received by user-land as SIGSEGV. It is wrong, it should
be reported as SIGBUS as it was before 52d7523d commit.

Changed do_bad_area function to take signal and code parameters out of esr
value using fault_info table, so in case of do_alignment_fault fault
user-land will receive SIGBUS. Wrapped access to fault_info table into
esr_to_fault_info function.

Cc: <stable@vger.kernel.org>
Fixes: 52d7523d (arm64: mm: allow the kernel to handle alignment faults on user accesses)
Signed-off-by: default avatarVictor Kamensky <kamensky@cisco.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent a71c9a1c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment