kernel-hacking-2024-linux-s.../arch/microblaze
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
configs printk: Remove redundant CONFIG_BASE_FULL 2024-05-06 17:39:09 +02:00
include arch: define CONFIG_PAGE_SIZE_*KB on all architectures 2024-03-06 19:29:09 +01:00
kernel syscalls: mmap(): use unsigned offset type consistently 2024-06-25 15:57:38 +02:00
lib
mm microblaze: Remove zalloc_maybe_bootmem() 2023-08-23 09:35:22 +02:00
pci microblaze/PCI: Moving PCI iounmap and dependent code 2022-11-25 11:39:23 +01:00
Kbuild
Kconfig arch: define CONFIG_PAGE_SIZE_*KB on all architectures 2024-03-06 19:29:09 +01:00
Kconfig.debug
Kconfig.platform
Makefile