This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] posix: Fix __gen_tempname iteration entropy (BZ#15813)
- From: Yann Droneaud <ydroneaud at opteya dot com>
- To: adhemerval dot zanella at linaro dot org, libc-alpha at sourceware dot org
- Date: Mon, 29 Apr 2019 12:16:12 +0200
- Subject: Re: [PATCH] posix: Fix __gen_tempname iteration entropy (BZ#15813)
- References: <20190404083142.30008-1-adhemerval.zanella@linaro.org>
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