elf: Do not set invalid tunables values
commitf94446c38fb3f4ad26183984c490a9590cd05282
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 6 Dec 2023 13:24:02 +0000 (6 10:24 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 19 Dec 2023 16:25:45 +0000 (19 13:25 -0300)
tree6e9ef3cea607f8bf54757a4b051ba0f79f3de6bb
parent2a969b53c0b02fed7e43473a92f219d737fd217a
elf: Do not set invalid tunables values

The loader now warns for invalid and out-of-range tunable values. The
patch also fixes the parsing of size_t maximum values, where
_dl_strtoul was failing for large values close to SIZE_MAX.

Checked on x86_64-linux-gnu.
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
elf/dl-misc.c
elf/dl-tunables.c
elf/tst-tunables.c