Re: linux-next: build warnings after merge of the mm tree

Andrii Nakryiko
2024-07-01T01:13:25Z

On Sun, Jun 30, 2024 at 6:01 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
>
> After merging the mm tree, today's linux-next build (arm
> multi_v7_defconfig) produced these warnings:
>
> fs/proc/task_mmu.c: In function 'do_procmap_query':
> fs/proc/task_mmu.c:598:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
> 598 | if (karg.vma_name_size && copy_to_user((void __user *)karg.vma_name_addr,
> | ^
> fs/proc/task_mmu.c:605:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
> 605 | if (karg.build_id_size && copy_to_user((void __user *)karg.build_id_addr,

argh, 32-bit strikes back. We have to do (void __user *)(unsigned
long) cast to satisfy 32-bit compilers. I'll send a patch for mm tree,
thanks for the heads up

> | ^
>
> Introduced by commits
>
> 3757be498749 ("fs/procfs: implement efficient VMA querying API for /proc/<pid>/maps")
> df789ce1eb90 ("fs/procfs: add build ID fetching to PROCMAP_QUERY API")
>
> --
> Cheers,
> Stephen Rothwell