linux/arch/loongarch
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 LoongArch: Fix GMAC's phy-mode definitions in dts 2024-06-03 15:45:53 +08:00
configs LoongArch changes for v6.10 2024-05-22 09:43:07 -07:00
crypto LoongArch/crypto: Clean up useless assignment operations 2024-03-19 15:50:34 +08:00
include LoongArch: Trigger user-space watchpoints correctly 2024-06-21 10:18:40 +08:00
kernel syscalls: mmap(): use unsigned offset type consistently 2024-06-25 15:57:38 +02:00
kvm LoongArch: KVM: Remove an unneeded semicolon 2024-06-21 10:18:40 +08:00
lib LoongArch: Select ARCH_SUPPORTS_INT128 if CC_HAS_INT128 2024-05-14 12:24:18 +08:00
mm LoongArch changes for v6.10 2024-05-22 09:43:07 -07:00
net bpf: Take return from set_memory_rox() into account with bpf_jit_binary_lock_ro() 2024-03-14 19:28:52 -07:00
pci
power LoongArch: Give a chance to build with !CONFIG_SMP 2024-05-14 12:24:18 +08:00
vdso Makefile: remove redundant tool coverage variables 2024-05-14 23:35:48 +09:00
Kbuild
Kconfig LoongArch: Only allow OBJTOOL & ORC unwinder if toolchain supports -mthin-add-sub 2024-06-21 10:18:40 +08:00
Kconfig.debug LoongArch: Only allow OBJTOOL & ORC unwinder if toolchain supports -mthin-add-sub 2024-06-21 10:18:40 +08:00
Makefile - A series ("kbuild: enable more warnings by default") from Arnd 2024-05-22 18:59:29 -07:00