]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
arm64: mm: allow the kernel to handle alignment faults on user accesses
authorEunTaik Lee <eun.taik.lee@samsung.com>
Tue, 16 Feb 2016 04:44:35 +0000 (04:44 +0000)
committerWill Deacon <will.deacon@arm.com>
Fri, 19 Feb 2016 12:20:37 +0000 (12:20 +0000)
commit52d7523d84d534c241ebac5ac89f5c0a6cb51e41
treeb0b73efa8e66a28c4f8b42bc7062c172a7e274e8
parent8684fa3e7a9ee629ca60bd811d1597646451f918
arm64: mm: allow the kernel to handle alignment faults on user accesses

Although we don't expect to take alignment faults on access to normal
memory, misbehaving (i.e. buggy) user code can pass MMIO pointers into
system calls, leading to things like get_user accessing device memory.

Rather than OOPS the kernel, allow any exception fixups to run and
return something like -EFAULT back to userspace. This makes the
behaviour more consistent with userspace, even though applications with
access to device mappings can easily cause other issues if they try
hard enough.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Eun Taik Lee <eun.taik.lee@samsung.com>
[will: dropped __kprobes annotation and rewrote commit mesage]
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/mm/fault.c