search for: hwrng_no_read_at_prob

Displaying 8 results from an estimated 8 matches for "hwrng_no_read_at_prob".

Did you mean: hwrng_no_read_at_probe
2014 Jul 02
6
[PATCH 0/2] hwrng: don't fetch data before device init
Hi, When booting a recent kernel under KVM with the virtio-rng device enabled, the boot process was stalling. Bisect pointed to a commit made during the 3.15 window to fetch randomness from newly-registered devices in the hwrng core. The details are in the patches. I considered a couple of approaches, but basing on the init() function being registered, as is done in patch 1 here, seems like
2014 Jul 02
6
[PATCH 0/2] hwrng: don't fetch data before device init
Hi, When booting a recent kernel under KVM with the virtio-rng device enabled, the boot process was stalling. Bisect pointed to a commit made during the 3.15 window to fetch randomness from newly-registered devices in the hwrng core. The details are in the patches. I considered a couple of approaches, but basing on the init() function being registered, as is done in patch 1 here, seems like
2014 Jul 02
1
[PATCH 1/2 v2] hwrng: Allow drivers to disable reading during probe
...7,9 +347,11 @@ int hwrng_register(struct hwrng *rng) INIT_LIST_HEAD(&rng->list); list_add_tail(&rng->list, &rng_list); - bytes_read = rng_get_data(rng, bytes, sizeof(bytes), 1); - if (bytes_read > 0) - add_device_randomness(bytes, bytes_read); + if (!(rng->flags & HWRNG_NO_READ_AT_PROBE)) { + bytes_read = rng_get_data(rng, bytes, sizeof(bytes), 1); + if (bytes_read > 0) + add_device_randomness(bytes, bytes_read); + } out_unlock: mutex_unlock(&rng_mutex); out: diff --git a/include/linux/hw_random.h b/include/linux/hw_random.h index b4b0eef5fddf..5e358c7f3aae 100644...
2014 Jul 02
3
[PATCH 1/2 v2] hwrng: Allow drivers to disable reading during probe
...LIST_HEAD(&rng->list); > > list_add_tail(&rng->list, &rng_list); > > > > - bytes_read = rng_get_data(rng, bytes, sizeof(bytes), 1); > > - if (bytes_read > 0) > > - add_device_randomness(bytes, bytes_read); > > + if (!(rng->flags & HWRNG_NO_READ_AT_PROBE)) { > > + bytes_read = rng_get_data(rng, bytes, sizeof(bytes), 1); > > + if (bytes_read > 0) > > + add_device_randomness(bytes, bytes_read); > > + } > > But this has the inverse problem: if there are two hwrngs in the > system, one will be initialized and p...
2014 Jul 02
3
[PATCH 1/2 v2] hwrng: Allow drivers to disable reading during probe
...LIST_HEAD(&rng->list); > > list_add_tail(&rng->list, &rng_list); > > > > - bytes_read = rng_get_data(rng, bytes, sizeof(bytes), 1); > > - if (bytes_read > 0) > > - add_device_randomness(bytes, bytes_read); > > + if (!(rng->flags & HWRNG_NO_READ_AT_PROBE)) { > > + bytes_read = rng_get_data(rng, bytes, sizeof(bytes), 1); > > + if (bytes_read > 0) > > + add_device_randomness(bytes, bytes_read); > > + } > > But this has the inverse problem: if there are two hwrngs in the > system, one will be initialized and p...
2014 Jul 02
0
[PATCH 1/2 v2] hwrng: Allow drivers to disable reading during probe
...truct hwrng *rng) > INIT_LIST_HEAD(&rng->list); > list_add_tail(&rng->list, &rng_list); > > - bytes_read = rng_get_data(rng, bytes, sizeof(bytes), 1); > - if (bytes_read > 0) > - add_device_randomness(bytes, bytes_read); > + if (!(rng->flags & HWRNG_NO_READ_AT_PROBE)) { > + bytes_read = rng_get_data(rng, bytes, sizeof(bytes), 1); > + if (bytes_read > 0) > + add_device_randomness(bytes, bytes_read); > + } But this has the inverse problem: if there are two hwrngs in the system, one will be initialized and probed. The other will not be initi...
2014 Jul 02
0
[PATCH 1/2 v2] hwrng: Allow drivers to disable reading during probe
...> list_add_tail(&rng->list, &rng_list); >> > >> > - bytes_read = rng_get_data(rng, bytes, sizeof(bytes), 1); >> > - if (bytes_read > 0) >> > - add_device_randomness(bytes, bytes_read); >> > + if (!(rng->flags & HWRNG_NO_READ_AT_PROBE)) { >> > + bytes_read = rng_get_data(rng, bytes, sizeof(bytes), 1); >> > + if (bytes_read > 0) >> > + add_device_randomness(bytes, bytes_read); >> > + } >> >> But this has the inverse problem: if there are t...
2014 Jul 02
0
[PATCH 1/2 v2] hwrng: Allow drivers to disable reading during probe
...> > > list_add_tail(&rng->list, &rng_list); > > > > > > - bytes_read = rng_get_data(rng, bytes, sizeof(bytes), 1); > > > - if (bytes_read > 0) > > > - add_device_randomness(bytes, bytes_read); > > > + if (!(rng->flags & HWRNG_NO_READ_AT_PROBE)) { > > > + bytes_read = rng_get_data(rng, bytes, sizeof(bytes), 1); > > > + if (bytes_read > 0) > > > + add_device_randomness(bytes, bytes_read); > > > + } > > > > But this has the inverse problem: if there are two hwrngs in the > > sy...