[PATCH 0/6] arm: don't call addr_limit_user_check for nommu

Christoph Hellwig hch at lst.de
Mon Jul 20 11:54:41 EDT 2020

On arm nommu kernel use the same constant for USER_DS and KERNEL_DS,
and seqment_eq always returns false.  With the current check in
addr_limit_user_check that works by accident, but when replacing
seqment_eq with uaccess_kerne it will fail.  Just remove the not
needed check entirely.

Signed-off-by: Christoph Hellwig <hch at lst.de>
Reported-by: Guenter Roeck <linux at roeck-us.net>

Andrew: this should preferably go before the other patches in this

 arch/arm/kernel/signal.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c
index ab2568996ddb0c..c9dc912b83f012 100644
--- a/arch/arm/kernel/signal.c
+++ b/arch/arm/kernel/signal.c
@@ -713,7 +713,9 @@ struct page *get_signal_page(void)
 /* Defer to generic check */
 asmlinkage void addr_limit_check_failed(void)
+#ifdef CONFIG_MMU

More information about the linux-riscv mailing list