2020-07-12 13:04:53 +00:00
|
|
|
glibc.malloc.arena_max: 0x0 (min: 0x1, max: 0x[f]+)
|
|
|
|
|
glibc.malloc.arena_test: 0x0 (min: 0x1, max: 0x[f]+)
|
|
|
|
|
glibc.malloc.check: 0 (min: 0, max: 3)
|
malloc: Add Huge Page support for mmap
With the morecore hook removed, there is not easy way to provide huge
pages support on with glibc allocator without resorting to transparent
huge pages. And some users and programs do prefer to use the huge pages
directly instead of THP for multiple reasons: no splitting, re-merging
by the VM, no TLB shootdowns for running processes, fast allocation
from the reserve pool, no competition with the rest of the processes
unlike THP, no swapping all, etc.
This patch extends the 'glibc.malloc.hugetlb' tunable: the value
'2' means to use huge pages directly with the system default size,
while a positive value means and specific page size that is matched
against the supported ones by the system.
Currently only memory allocated on sysmalloc() is handled, the arenas
still uses the default system page size.
To test is a new rule is added tests-malloc-hugetlb2, which run the
addes tests with the required GLIBC_TUNABLE setting. On systems without
a reserved huge pages pool, is just stress the mmap(MAP_HUGETLB)
allocation failure. To improve test coverage it is required to create
a pool with some allocated pages.
Checked on x86_64-linux-gnu.
Reviewed-by: DJ Delorie <dj@redhat.com>
2021-08-16 18:08:27 +00:00
|
|
|
glibc.malloc.hugetlb: 0x0 (min: 0x0, max: 0x[f]+)
|
2021-02-05 08:39:24 +00:00
|
|
|
glibc.malloc.mmap_max: 0 (min: 0, max: 2147483647)
|
2020-07-12 13:04:53 +00:00
|
|
|
glibc.malloc.mmap_threshold: 0x0 (min: 0x0, max: 0x[f]+)
|
|
|
|
|
glibc.malloc.mxfast: 0x0 (min: 0x0, max: 0x[f]+)
|
|
|
|
|
glibc.malloc.perturb: 0 (min: 0, max: 255)
|
|
|
|
|
glibc.malloc.tcache_count: 0x0 (min: 0x0, max: 0x[f]+)
|
|
|
|
|
glibc.malloc.tcache_max: 0x0 (min: 0x0, max: 0x[f]+)
|
|
|
|
|
glibc.malloc.tcache_unsorted_limit: 0x0 (min: 0x0, max: 0x[f]+)
|
2022-08-04 08:24:47 +00:00
|
|
|
glibc.malloc.top_pad: 0x20000 (min: 0x0, max: 0x[f]+)
|
2020-07-12 13:04:53 +00:00
|
|
|
glibc.malloc.trim_threshold: 0x0 (min: 0x0, max: 0x[f]+)
|
2021-12-14 11:37:44 +00:00
|
|
|
glibc.rtld.dynamic_sort: 2 (min: 1, max: 2)
|
2024-02-29 19:55:58 +00:00
|
|
|
glibc.rtld.enable_secure: 0 (min: 0, max: 1)
|
elf: Extend glibc.rtld.execstack tunable to force executable stack (BZ 32653)
From the bug report [1], multiple programs still require to dlopen
shared libraries with either missing PT_GNU_STACK or with the executable
bit set. Although, in some cases, it seems to be a hard-craft assembly
source without the required .note.GNU-stack marking (so the static linker
is forced to set the stack executable if the ABI requires it), other
cases seem that the library uses trampolines [2].
Unfortunately, READ_IMPLIES_EXEC is not an option since on some ABIs
(x86_64), the kernel clears the bit, making it unsupported. To avoid
reinstating the broken code that changes stack permission on dlopen
(0ca8785a28), this patch extends the glibc.rtld.execstack tunable to
allow an option to force an executable stack at the program startup.
The tunable is a security issue because it defeats the PT_GNU_STACK
hardening. It has the slight advantage of making it explicit by the
caller, and, as for other tunables, this is disabled for setuid binaries.
A tunable also allows us to eventually remove it, but from previous
experiences, it would require some time.
Checked on aarch64-linux-gnu, x86_64-linux-gnu, and i686-linux-gnu.
[1] https://sourceware.org/bugzilla/show_bug.cgi?id=32653
[2] https://github.com/conda-forge/ctng-compiler-activation-feedstock/issues/143
Reviewed-by: Sam James <sam@gentoo.org>
2025-02-13 17:02:38 +00:00
|
|
|
glibc.rtld.execstack: 1 (min: 0, max: 2)
|
2020-07-12 13:04:53 +00:00
|
|
|
glibc.rtld.nns: 0x4 (min: 0x1, max: 0x10)
|
|
|
|
|
glibc.rtld.optional_static_tls: 0x200 (min: 0x0, max: 0x[f]+)
|