Bug 218953

Summary: copy_from_kernel_nofault_allowed() breaks MMUless devices
Product: Memory Management Reporter: Yanjun Yang (yangyj.ee)
Component: OtherAssignee: Andrew Morton (akpm)
Status: RESOLVED PATCH_ALREADY_AVAILABLE    
Severity: normal CC: yangyj.ee
Priority: P3    
Hardware: ARM   
OS: Linux   
Kernel Version: Subsystem:
Regression: No Bisected commit-id:
Attachments: fix address check bug for MMUless devices.

Description Yanjun Yang 2024-06-11 08:49:39 UTC
Created attachment 306450 [details]
fix address check bug for MMUless devices.

commit-id: 169f9102f9198b04afffa6164372a4ba4070f412 introduced copy_from_kernel_nofault_allowed() to check valid address. However,
for devices without MMU, addr > TASK_SIZE will fail. I'm using stm32,
not sure for others.

attached patch fixed this bug for me.
Comment 1 Yanjun Yang 2024-06-11 11:48:04 UTC
Also sent a patch to the linux-arm-kernel maillist. "[PATCH] ARM: Remove address checking for MMUless devices". Wish this will help the process.
Comment 2 Yanjun Yang 2024-06-11 12:11:01 UTC
(In reply to Yanjun Yang from comment #1)
> Also sent a patch to the linux-arm-kernel maillist. "[PATCH] ARM: Remove
> address checking for MMUless devices". Wish this will help the process.
But I forget to CC anyone...
Comment 3 Yanjun Yang 2024-07-16 05:48:01 UTC
My patch will be merged in v6.11-rc1.