[PATCH v3 1/2] ARM: mm: fix use-after-free in __do_user_fault() under CONFIG_DEBUG_USER
Xie Yuanbin
xieyuanbin1 at huawei.com
Tue Jul 7 06:14:09 PDT 2026
On Tue, 7 Jul 2026 12:57:45 +0100, Russell King wrote:
> No. This information is useful debug for kernel oops.
For kernel oops, I think it should be `!user_mode(regs)`, Qi Xi's reply:
On Tue, 7 Jul 2026 19:48:12 +0800, Qi Xi wrote:
> For do_DataAbort() fallback:
>
> if (user_mode(regs)) {
> if (addr < TASK_SIZE) {
> mmap_read_lock(current->mm);
> show_pte(KERN_ALERT, current->mm, addr);
> mmap_read_unlock(current->mm);
> }
> } else {
> show_pte(KERN_ALERT, current->mm, addr);
> }
changes nothing to kernel oops. It only skip show_pte() for user-mode
faults, and the fault addr is a kernel address, which means a user
program is trying to access a kernel address.
I think it is reasonable to skip show_pte() in this case?
More information about the linux-arm-kernel
mailing list