[PATCH 46/46] fs/proc/task_mmu: refuse addresses beyond 32 bits on 32bit
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Mon Oct 26 17:14:29 PDT 2026
> From: Josef Bacik <josef at toxicpanda.com>
>
> The addresses in struct pm_scan_arg are 64 bits wide. The first thing
> pagemap_scan_get_args() does with them is to cast them to unsigned
> long. On a 32-bit kernel the upper half is dropped without a word:
> PAGEMAP_SCAN of 0x100001000-0x100002000 scans, and with
> PM_SCAN_WP_MATCHING write-protects, 0x1000-0x2000, stores the result
> at the lower half of vec, and reports success.
>
> Return -EFAULT, as for other addresses outside of the address space.
>
> This is probably not worth CCing stable.
>
> Fix generated by an LLM and sent by Josef Bacik in private.
>
> Fixes: 52526ca7fdb9 ("fs/proc/task_mmu: implement IOCTL to get and optionally clear info about PTEs")
> Signed-off-by: Josef Bacik <josef at toxicpanda.com>
> Acked-by: Lorenzo Stoakes (ARM) <ljs at kernel.org>
> Signed-off-by: David Hildenbrand (Arm) <david at kernel.org>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261027-fixes_core-v1-0-6f74bec9a5bb@kernel.org?part=46
More information about the kexec
mailing list