Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
arm64: armv8_deprecated: Fix swp_handler() signal generation
arm64_notify_segfault() was written to decide on the si_code from the assembly emulation of the swp_handler(), but was also used for the signal generation from failed access_ok() and unaligned instructions. When access_ok() fails, there is no need to search for the offending address in the VMA space. Instead, simply set the error to SIGSEGV with si_code SEGV_ACCERR. Change the return code from emulate_swpX() when there is an unaligned pointer so the caller can differentiate from the EFAULT. It is unnecessary to search the VMAs in the case of an unaligned pointer. This change uses SIGSEGV and SEGV_ACCERR instead of SIGBUS to keep with what was returned before. Fixes: bd35a4a (arm64: Port SWP/SWPB emulation support from arm) Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
- Loading branch information