Lines Matching full:generation
136 * @rng_info->generation must always be read here, as it serializes @state->key with the in __cvdso_getrandom_data()
139 current_generation = READ_ONCE(rng_info->generation); in __cvdso_getrandom_data()
142 * If @state->generation doesn't match the kernel RNG's generation, then it means the in __cvdso_getrandom_data()
145 if (unlikely(state->generation != current_generation)) { in __cvdso_getrandom_data()
147 * Write the generation before filling the key, in case of fork. If there is a fork in __cvdso_getrandom_data()
151 * generation counter, so the fork would not be detected. Therefore, write in __cvdso_getrandom_data()
152 * @state->generation before the call to the getrandom syscall. in __cvdso_getrandom_data()
154 WRITE_ONCE(state->generation, current_generation); in __cvdso_getrandom_data()
158 * smp_store_release(&vdso_k_rng_data->generation) in random.c. in __cvdso_getrandom_data()
166 * invalid, so invalidate the generation so that it is not used again, and in __cvdso_getrandom_data()
169 WRITE_ONCE(state->generation, 0); in __cvdso_getrandom_data()
204 /* Prevent the loop from being reordered wrt ->generation. */ in __cvdso_getrandom_data()
208 * Since @rng_info->generation will never be 0, re-read @state->generation, rather in __cvdso_getrandom_data()
214 if (unlikely(READ_ONCE(state->generation) != READ_ONCE(rng_info->generation))) { in __cvdso_getrandom_data()