tunables: Fix comparison of tunable values
commitd1a3dcabf2f89233a99a4a9be08f9f407da0b6b4
authorSiddhesh Poyarekar <siddhesh@sourceware.org>
Tue, 16 Mar 2021 13:01:02 +0000 (16 18:31 +0530)
committerSiddhesh Poyarekar <siddhesh@sourceware.org>
Wed, 7 Apr 2021 08:36:18 +0000 (7 14:06 +0530)
tree923c89bfe24a3ab053337bcf3eb36675ee276c68
parentbf6b6243c9fe6e9727282ed63f774698e730cedd
tunables: Fix comparison of tunable values

The simplification of tunable_set interfaces took care of
signed/unsigned conversions while setting values, but comparison with
bounds ended up being incorrect; comparing TUNABLE_SIZE_T values for
example will fail because SIZE_MAX is seen as -1.

Add comparison helpers that take tunable types into account and use
them to do comparison instead.
elf/dl-tunable-types.h
elf/dl-tunables.c
elf/dl-tunables.h