[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4381e8fc-67eb-c7f8-d4ad-17a1fe0a5bfa@kernel.org>
Date: Fri, 5 Sep 2025 16:15:06 -0600 (MDT)
From: Paul Walmsley <pjw@...nel.org>
To: Alexandre Ghiti <alexghiti@...osinc.com>
cc: kernel test robot <lkp@...el.com>, Al Viro <viro@...iv.linux.org.uk>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>, Albert Ou <aou@...s.berkeley.edu>,
Alexandre Ghiti <alex@...ti.fr>, Cyril Bur <cyrilbur@...storrent.com>,
Jisheng Zhang <jszhang@...nel.org>, linux-riscv@...ts.infradead.org,
linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH 2/2] riscv: Fix sparse warning about different address
spaces
On Wed, 3 Sep 2025, Alexandre Ghiti wrote:
> We did not propagate the __user attribute of the pointers in
> __get_kernel_nofault() and __put_kernel_nofault(), which results in
> sparse complaining:
>
> >> mm/maccess.c:41:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got unsigned long long [usertype] * @@
> mm/maccess.c:41:17: sparse: expected void const [noderef] __user *from
> mm/maccess.c:41:17: sparse: got unsigned long long [usertype] *
>
> So fix this by correctly casting those pointers.
>
> Reported-by: kernel test robot <lkp@...el.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202508161713.RWu30Lv1-lkp@intel.com/
> Suggested-by: Al Viro <viro@...iv.linux.org.uk>
> Fixes: f6bff7827a48 ("riscv: uaccess: use 'asm_goto_output' for get_user()")
> Cc: stable@...r.kernel.org
> Signed-off-by: Alexandre Ghiti <alexghiti@...osinc.com>
Thanks, queued for v6.17-rc fixes.
- Paul
Powered by blists - more mailing lists