Commit fbcd945b authored by Joachim Vandersmissen's avatar Joachim Vandersmissen Committed by Treehugger Robot
Browse files

UPSTREAM: crypto: jitter - output full sample from test interface



The Jitter RNG time delta is computed based on the difference of two
high-resolution, 64-bit time stamps. However, the test interface added
in 69f1c387 only outputs the lower 32 bits of those time stamps. To
ensure all information is available during the evaluation process of
the Jitter RNG, output the full 64-bit time stamps.

Any clients collecting data from the test interface will need to be
updated to take this change into account.

Additionally, the size of the temporary buffer that holds the data for
user space has been clarified. Previously, this buffer was
JENT_TEST_RINGBUFFER_SIZE (= 1000) bytes in size, however that value
represents the number of samples held in the kernel space ring buffer,
with each sample taking 8 (previously 4) bytes.

Rather than increasing the size to allow for all 1000 samples to be
output, we keep it at 1000 bytes, but clarify that this means at most
125 64-bit samples will be output every time this interface is called.

Reviewed-by: default avatarStephan Mueller <smueller@chronox.de>
Signed-off-by: default avatarJoachim Vandersmissen <git@jvdsn.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>

(cherry picked from commit 04305f83)
Bug: 452983442
Bug: 425813935
Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
Cherrypick-From: https://android-review.googlesource.com/q/commit:b510ecc6cb8057e5796ee133f46035a2a3501612


Merged-In: I969bc776c2df134ebfe79fe79f04f5151e0588f0
Change-Id: I969bc776c2df134ebfe79fe79f04f5151e0588f0
Signed-off-by: default avatarGina Ko <yichunko@google.com>
parent bcac68da
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment