]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: BUG if jumping to usermode address in kernel mode
authorRussell King <rmk+kernel@armlinux.org.uk>
Fri, 24 Nov 2017 23:49:34 +0000 (23:49 +0000)
committerRussell King <rmk+kernel@armlinux.org.uk>
Sun, 26 Nov 2017 15:41:39 +0000 (15:41 +0000)
commite112d656334d8c638b091ed20a454e0850cfc097
tree1c2a7d64f216df552e4509dc746d8da3436e39ab
parent8b07729d26f7615ada92ef671c6ab987a843d57a
ARM: BUG if jumping to usermode address in kernel mode

Detect if we are returning to usermode via the normal kernel exit paths
but the saved PSR value indicates that we are in kernel mode.  This
could occur due to corrupted stack state, which has been observed with
"ftracetest".

This ensures that we catch the problem case before we get to user code.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
arch/arm/include/asm/assembler.h
arch/arm/kernel/entry-header.S