]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: kernel: Save and restore UAO and addr_limit on exception entry
authorJames Morse <james.morse@arm.com>
Mon, 20 Jun 2016 17:28:01 +0000 (18:28 +0100)
committerWill Deacon <will.deacon@arm.com>
Thu, 7 Jul 2016 14:55:37 +0000 (15:55 +0100)
commit923930034bb3fc88989de676a52f1e48244cdb02
treef8e7898101568c82617d7afd66e712b9f0538a0e
parentdf5a8a9ace16d9351a8a97dd598e0b53b307b766
arm64: kernel: Save and restore UAO and addr_limit on exception entry

If we take an exception while at EL1, the exception handler inherits
the original context's addr_limit and PSTATE.UAO values. To be consistent
always reset addr_limit and PSTATE.UAO on (re-)entry to EL1. This
prevents accidental re-use of the original context's addr_limit.

Based on a similar patch for arm from Russell King.

Cc: <stable@vger.kernel.org> # 4.6-
Acked-by: Will Deacon <will.deacon@arm.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/ptrace.h
arch/arm64/kernel/asm-offsets.c
arch/arm64/kernel/entry.S
arch/arm64/mm/fault.c