linux-yocto/arch
Alexandre Ghiti 6976744651 riscv: Fix sparse warning about different address spaces
commit a03ee11b8f850bd008226c6d392da24163dfb56e upstream.

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@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202508161713.RWu30Lv1-lkp@intel.com/
Suggested-by: Al Viro <viro@zeniv.linux.org.uk>
Fixes: f6bff7827a ("riscv: uaccess: use 'asm_goto_output' for get_user()")
Cc: stable@vger.kernel.org
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Reviewed-by: Cyril Bur <cyrilbur@tenstorrent.com>
Link: https://lore.kernel.org/r/20250903-dev-alex-sparse_warnings_v1-v1-2-7e6350beb700@rivosinc.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-09 19:02:41 +02:00
..
alpha mm: pgtable: fix pte_swp_exclusive 2025-06-11 14:52:08 -07:00
arc ARC fixes for 6.16 2025-06-12 08:17:56 -07:00
arm ARM: dts: microchip: sama7d65: Force SDMMC Legacy mode 2025-09-09 19:02:18 +02:00
arm64 arm64: ftrace: fix unreachable PLT for ftrace_caller in init_module with CONFIG_DYNAMIC_FTRACE 2025-09-09 19:02:28 +02:00
csky mm: pgtable: fix pte_swp_exclusive 2025-06-11 14:52:08 -07:00
hexagon mm: pgtable: fix pte_swp_exclusive 2025-06-11 14:52:08 -07:00
loongarch LoongArch: Add cpuhotplug hooks to fix high cpu usage of vCPU threads 2025-09-09 19:02:15 +02:00
m68k m68k: Fix lost column on framebuffer debug console 2025-08-28 16:34:12 +02:00
microblaze mm: pgtable: fix pte_swp_exclusive 2025-06-11 14:52:08 -07:00
mips mips: lantiq: xway: sysctrl: rename the etop node 2025-09-04 16:55:29 +02:00
nios2 mm: pgtable: fix pte_swp_exclusive 2025-06-11 14:52:08 -07:00
openrisc mm: pgtable: fix pte_swp_exclusive 2025-06-11 14:52:08 -07:00
parisc parisc: Update comments in make_insert_tlb 2025-08-28 16:34:27 +02:00
powerpc powerpc/kvm: Fix ifdef to remove build warning 2025-09-04 16:55:33 +02:00
riscv riscv: Fix sparse warning about different address spaces 2025-09-09 19:02:41 +02:00
s390 s390/hypfs: Enable limited access during lockdown 2025-08-28 16:34:51 +02:00
sh sh: Do not use hyphen in exported variable name 2025-08-15 16:39:12 +02:00
sparc mm: pgtable: fix pte_swp_exclusive 2025-06-11 14:52:08 -07:00
um um: Re-evaluate thread flags repeatedly 2025-08-20 18:41:09 +02:00
x86 x86/mm/64: define ARCH_PAGE_TABLE_SYNC_MASK and arch_sync_kernel_mappings() 2025-09-09 19:02:29 +02:00
xtensa mm: pgtable: fix pte_swp_exclusive 2025-06-11 14:52:08 -07:00
.gitignore
Kconfig fs/resctrl: Add boiler plate for external resctrl code 2025-05-16 11:05:40 +02:00