tunables: Make tunable_list relro

System Internals / glibc - Siddhesh Poyarekar [sourceware.org] - 11 May 2017 10:45 UTC

As of now we don't need tunables to be writable after they have been set initially, so there is no point in having them writable. Put tunable_list in .data.rel.ro so that it is set as read-only after relocation. This also allows us to move some of the dl_* variables that are tunables controlled into the tunables infrastructure instead of having two copies.

In future if we ever need specific tunables to be writable at runtime, we can split the tunable_list into two.

Regression tested on x86_64 to verify that tests continue to pass.

- scripts/gen-tunables.awk: Add attribute_relro to tunable_list.

17284d6 tunables: Make tunable_list relro
ChangeLog | 5 +++++
scripts/gen-tunables.awk | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)

Upstream: sourceware.org

  • Share