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
..
2022-02-25 09:36:06 +01:00
2023-02-13 22:13:29 +01:00
2017-11-15 13:28:48 -08:00
2024-05-07 14:20:48 +02:00
2023-12-15 16:25:55 -08:00
2024-01-17 17:52:29 -08:00
2021-12-11 23:31:51 +01:00
2024-04-11 16:23:56 -07:00
2020-01-23 10:41:16 -08:00
2024-04-11 16:23:56 -07:00
2022-07-22 17:34:57 -05:00
2022-05-26 10:50:30 -07:00
2022-02-25 09:36:06 +01:00