]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ARM: 9350/1: fault: Implement copy_from_kernel_nofault_allowed()
authorKees Cook <keescook@chromium.org>
Thu, 1 Feb 2024 17:32:58 +0000 (18:32 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Apr 2025 08:06:36 +0000 (10:06 +0200)
commitfe17c8aaa90f1d373a5c2c3a701a36534355d5b2
treeecafc16fa9eaf5e09a6e97d5a2bf6a6d5cc84a22
parent9da6b6340dbcf0f60ae3ec6a7d6438337c32518a
ARM: 9350/1: fault: Implement copy_from_kernel_nofault_allowed()

commit 169f9102f9198b04afffa6164372a4ba4070f412 upstream.

Under PAN emulation when dumping backtraces from things like the
LKDTM EXEC_USERSPACE test[1], a double fault (which would hang a CPU)
would happen because of dump_instr() attempting to read a userspace
address. Make sure copy_from_kernel_nofault() does not attempt this
any more.

Closes: https://lava.sirena.org.uk/scheduler/job/497571
Link: https://lore.kernel.org/all/202401181125.D48DCB4C@keescook/
Reported-by: Mark Brown <broonie@kernel.org>
Suggested-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Tested-by: Mark Brown <broonie@kernel.org>
Cc: Wang Kefeng <wangkefeng.wang@huawei.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Ben Hutchings <ben@decadent.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm/mm/fault.c