diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2022-01-18 13:45:09 +0100 |
---|---|---|
committer | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2022-01-19 12:10:53 +0100 |
commit | 15420269b02a63ed8c1841905d8b8b2403246004 (patch) | |
tree | 6ed3fdf9fa2d8d9f51121996ecec99ad180a48a3 /arch/sparc/Kbuild | |
parent | ARM: 9170/1: fix panic when kasan and kprobe are enabled (diff) | |
download | linux-15420269b02a63ed8c1841905d8b8b2403246004.tar.xz linux-15420269b02a63ed8c1841905d8b8b2403246004.zip |
ARM: 9179/1: uaccess: avoid alignment faults in copy_[from|to]_kernel_nofault
The helpers that are used to implement copy_from_kernel_nofault() and
copy_to_kernel_nofault() cast a void* to a pointer to a wider type,
which may result in alignment faults on ARM if the compiler decides to
use double-word or multiple-word load/store instructions.
Only configurations that define CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
are affected, given that commit 2423de2e6f4d ("ARM: 9115/1: mm/maccess:
fix unaligned copy_{from,to}_kernel_nofault") ensures that dst and src
are sufficiently aligned otherwise.
So use the unaligned accessors for accessing dst and src in cases where
they may be misaligned.
Cc: <stable@vger.kernel.org> # depends on 2423de2e6f4d
Fixes: 2df4c9a741a0 ("ARM: 9112/1: uaccess: add __{get,put}_kernel_nofault")
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'arch/sparc/Kbuild')
0 files changed, 0 insertions, 0 deletions