[PATCH v2] linux: add definitions for hugetlb page size encodings

Florian Weimer fweimer@redhat.com
Tue Jun 18 08:34:46 GMT 2024


* Carlos Llamas:

> A desired hugetlb page size can be encoded in the flags parameter of
> system calls such as mmap() and shmget(). The Linux UAPI headers have
> included explicit definitions for these encodings since v4.14.
>
> This patch adds these definitions that are used along with MAP_HUGETLB
> and SHM_HUGETLB flags as specified in the corresponding man pages. This
> relieves programs from having to duplicate and/or compute the encodings
> manually.
>
> Additionally, the filter on these definitions in tst-mman-consts.py is
> removed, as suggested by Florian. I then ran this tests successfully,
> confirming the alignment with the kernel headers.
>
>   PASS: misc/tst-mman-consts
>   original exit status 0
>
> Signed-off-by: Carlos Llamas <cmllamas@google.com>

I ran the test on all supported glibc architectures, and it passed.

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

I'll apply this for you.

Thanks,
Florian



More information about the Libc-alpha mailing list