]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ARM: Remove address checking for MMUless devices
authorYanjun Yang <yangyj.ee@gmail.com>
Tue, 11 Jun 2024 10:09:47 +0000 (18:09 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Apr 2025 08:06:36 +0000 (10:06 +0200)
commitad0410346cc4edd76e7e51b5eb8f5cc795d5a0bc
treec90d9df3adcbc199014564090658a3967372d4e4
parent1809cabfe0e9efdb8432388aa6fedf9c0e926f93
ARM: Remove address checking for MMUless devices

commit 3ccea4784fddd96fbd6c4497eb28b45dab638c2a upstream.

Commit 169f9102f9198b ("ARM: 9350/1: fault: Implement
copy_from_kernel_nofault_allowed()") added the function to check address
before use. However, for devices without MMU, addr > TASK_SIZE will
always fail.  This patch move this function after the #ifdef CONFIG_MMU
statement.

Signed-off-by: Yanjun Yang <yangyj.ee@gmail.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218953
Fixes: 169f9102f9198b ("ARM: 9350/1: fault: Implement copy_from_kernel_nofault_allowed()")
Link: https://lore.kernel.org/r/20240611100947.32241-1-yangyj.ee@gmail.com
Signed-off-by: Kees Cook <kees@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm/mm/fault.c