linux/arch/riscv
Arnd Bergmann 295f10061a syscalls: mmap(): use unsigned offset type consistently
Most architectures that implement the old-style mmap() with byte offset
use 'unsigned long' as the type for that offset, but microblaze and
riscv have the off_t type that is shared with userspace, matching the
prototype in include/asm-generic/syscalls.h.

Make this consistent by using an unsigned argument everywhere. This
changes the behavior slightly, as the argument is shifted to a page
number, and an user input with the top bit set would result in a
negative page offset rather than a large one as we use elsewhere.

For riscv, the 32-bit sys_mmap2() definition actually used a custom
type that is different from the global declaration, but this was
missed due to an incorrect type check.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-06-25 15:57:38 +02:00
..
boot riscv: dts: sophgo: disable write-protection for milkv duo 2024-06-19 08:46:03 +08:00
configs RISC-V Patches for the 6.10 Merge Window, Part 1 2024-05-22 09:56:00 -07:00
crypto crypto: riscv - add vector crypto accelerated AES-CBC-CTS 2024-03-20 08:56:11 -07:00
errata RISC-V Patches for the 6.10 Merge Window, Part 1 2024-05-22 09:56:00 -07:00
include riscv: Fix fully ordered LR/SC xchg[8|16]() implementations 2024-05-30 09:43:14 -07:00
kernel syscalls: mmap(): use unsigned offset type consistently 2024-06-25 15:57:38 +02:00
kvm RISC-V: KVM: Fix incorrect reg_subtype labels in kvm_riscv_vcpu_set_reg_isa_ext function 2024-05-31 10:40:39 +05:30
lib riscv: uaccess: Relax the threshold for fast path 2024-05-22 16:12:55 -07:00
mm Revert "riscv: mm: accelerate pagefault when badaccess" 2024-06-03 07:41:13 -07:00
net Modules changes for v6.10-rc1 2024-05-15 14:05:08 -07:00
purgatory Makefile: remove redundant tool coverage variables 2024-05-14 23:35:48 +09:00
tools riscv: Check relocations at compile time 2023-04-19 07:46:32 -07:00
Kbuild RISC-V: hook new crypto subdir into build-system 2024-01-22 17:55:17 -08:00
Kconfig riscv: enable HAVE_ARCH_HUGE_VMAP for XIP kernel 2024-05-30 09:42:52 -07:00
Kconfig.debug riscv: Add tests for riscv module loading 2023-11-07 14:59:32 -08:00
Kconfig.errata riscv: thead: Rename T-Head PBMT to MAE 2024-04-25 10:22:33 -07:00
Kconfig.socs RISC-V: drop SOC_VIRT for ARCH_VIRT 2024-04-10 11:37:50 +01:00
Makefile RISC-V Patches for the 6.10 Merge Window, Part 2 2024-05-24 10:46:35 -07:00
Makefile.postlink kbuild: remove ARCH_POSTLINK from module builds 2023-10-28 21:10:08 +09:00