[PATCH 4/5] linux: Implement remap_file_pages in C (BZ 34917)

Florian Weimer fweimer@redhat.com
Fri Nov 6 09:40:00 GMT 2026


* Adhemerval Zanella:

> The kernel declares the remap_file_pages prot and flags as unsigned
> long, and fails with EINVAL if prot is nonzero, including bits 32 to 63
> (it masks the flags).  glibc takes both as int, and the assembly
> wrapper generated from syscalls.list passes the registers through
> unchanged, so a valid call can fail on x86_64, x32, and aarch64, where
> the upper half of a register holding a 32-bit argument is unspecified.
>
> Implement remap_file_pages in C, where INLINE_SYSCALL_CALL extends the
> arguments to the full register on these ABIs.
>
> The kernel logs a deprecation warning the first time remap_file_pages
> is called, so running the test adds it to the kernel log once per boot.

Okay.

Reviewed-by: Florian Weimer <fweimer@redhat.com>

Thanks,
Florian



More information about the Libc-alpha mailing list