]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - arch/arm64/kernel/entry.S
arm64: Make USER_DS an inclusive limit
authorRobin Murphy <robin.murphy@arm.com>
Mon, 5 Feb 2018 15:34:18 +0000 (15:34 +0000)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 22 Feb 2018 14:15:48 +0000 (08:15 -0600)
commit43ab11c85f86e8fa692a153a7e977f67469ae881
tree5de0fc526b253d0742288dbd1ce71beb44a353d6
parentebad59fb2e1d69f48f2747526f2cb43c54443762
arm64: Make USER_DS an inclusive limit

BugLink: http://bugs.launchpad.net/bugs/1751064
Commit 51369e398d0d upstream.

Currently, USER_DS represents an exclusive limit while KERNEL_DS is
inclusive. In order to do some clever trickery for speculation-safe
masking, we need them both to behave equivalently - there aren't enough
bits to make KERNEL_DS exclusive, so we have precisely one option. This
also happens to correct a longstanding false negative for a range
ending on the very top byte of kernel memory.

Mark Rutland points out that we've actually got the semantics of
addresses vs. segments muddled up in most of the places we need to
amend, so shuffle the {USER,KERNEL}_DS definitions around such that we
can correct those properly instead of just pasting "-1"s everywhere.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
arch/arm64/include/asm/processor.h
arch/arm64/include/asm/uaccess.h
arch/arm64/kernel/entry.S
arch/arm64/mm/fault.c