Searched hist:f2db4ebc0c8c4a752f81599a259a09bc8b8392d0 (Results 1 – 1 of 1) sorted by relevance
| /rk3399_ARM-atf/services/std_svc/trng/ |
| H A D | trng_entropy_pool.c | f2db4ebc0c8c4a752f81599a259a09bc8b8392d0 Wed Aug 13 11:10:21 UTC 2025 Jamie Fox <jamiefox@google.com> fix(trng): avoid undefined behaviour in pack_entropy
When nbits is a multiple of the word size, the pack_entropy function right shifts the mask by the type width, which is undefined. In practice, the 64-bit shift compiles to a no-op and the implementation depends on this behaviour, so this patch changes the function to skip the masking if nbits is multiple of the word size.
Change-Id: I478b8102aae0a1d49182e7a8a55f70fd9438b9f9 Signed-off-by: Jamie Fox <jamiefox@google.com>
|