[PATCH] posix: Fix __gen_tempname iteration entropy (BZ#15813)
Yann Droneaud
ydroneaud@opteya.com
Mon Apr 29 10:46:00 GMT 2019
Le jeudi 04 avril 2019 Ã 15:31 +0700, adhemerval.zanella@linaro.org a
écrit :
> From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
>
> Patch "Do not use HP_TIMING_NOW for random bits (359653aaacad4)"
> fixed
> mostly of the __gen_tempname issues described by BZ#15813. This patch
> fixes the remaining one by adding a extra call to random_bits for
> eac iteration while trying to create the random name.
>
> The patch also cleanups the tempname implementation since now it
> deviates from gnulib counterpart.
>
> Checked on powerpc64le-linux-gnu.
>
> [BZ #15813]
> * sysdeps/posix/tempname.c: Remove ununsed includes, redundant
> definitions, and defines used only for gnulib.
> (__gen_tempname): Set number of attemps to TMP_MAX and use
> random_bits on eachh iteration.
> ---
> ChangeLog | 8 ++++
> sysdeps/posix/tempname.c | 97 ++++--------------------------------
> ----
> 2 files changed, 17 insertions(+), 88 deletions(-)
>
For easier review (and maintenance) I would like this patch to be split
in 2 or more patches. At least: one for removing gnulib support, and
one to improve randomness for each retry.
Regards.
--
Yann Droneaud
OPTEYA
More information about the Libc-alpha
mailing list