qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4 04/24] crypto: Do not fail for EINTR during q


From: Laurent Vivier
Subject: Re: [Qemu-devel] [PATCH v4 04/24] crypto: Do not fail for EINTR during qcrypto_random_bytes
Date: Tue, 7 May 2019 11:19:24 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

On 06/05/2019 19:33, Richard Henderson wrote:
We can always get EINTR for read; /dev/urandom is no exception.

Rearrange the order of tests for likelihood; allow degenerate buflen==0
case to perform a no-op zero-length read.  This means that the normal
success path is a straight line with a single test for success.

Reviewed-by: Daniel P. Berrangé <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
---
v3: Rearrage the read loop again.
---
  crypto/random-platform.c | 36 +++++++++++++++---------------------
  1 file changed, 15 insertions(+), 21 deletions(-)


Reviewed-by: Laurent Vivier <address@hidden>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]