Bug 218953 - copy_from_kernel_nofault_allowed() breaks MMUless devices
Summary: copy_from_kernel_nofault_allowed() breaks MMUless devices
Status: RESOLVED PATCH_ALREADY_AVAILABLE
Alias: None
Product: Memory Management
Classification: Unclassified
Component: Other (show other bugs)
Hardware: ARM Linux
: P3 normal
Assignee: Andrew Morton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-11 08:49 UTC by Yanjun Yang
Modified: 2024-07-16 05:48 UTC (History)
1 user (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments
fix address check bug for MMUless devices. (1.04 KB, application/mbox)
2024-06-11 08:49 UTC, Yanjun Yang
Details

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.

Note You need to log in before you can comment on or make changes to this bug.