]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: treat unhandled compat el0 traps as undef
authorMark Rutland <mark.rutland@arm.com>
Fri, 24 May 2013 11:02:35 +0000 (12:02 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 31 May 2013 15:04:44 +0000 (16:04 +0100)
commit72e6c1ced82f15a6e7c75237608e7d8df03c7892
tree7b13ed8486efe15b07f1eb194241667a0f5c1fd9
parente520d5151ea91b7df0df319360cf60a58d199fd1
arm64: treat unhandled compat el0 traps as undef

Currently, if a compat process reads or writes from/to a disabled
cp15/cp14 register, the trap is not handled by the el0_sync_compat
handler, and the kernel will head to bad_mode, where it will die(), and
oops(). For 64 bit processes, disabled system register accesses are
currently treated as unhandled instructions.

This patch modifies entry.S to treat these unhandled traps as undefined
instructions, sending a SIGILL to userspace. This gives processes a
chance to handle this and stop using inaccessible registers, and
prevents further issues in the kernel as a result of the die().

Reported-by: Johannes Jensen <Johannes.Jensen@arm.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/entry.S