mbox series

[0/3] random: wire up in-kernel virtual machine fork notifications

Message ID 20220301231038.530897-1-Jason@zx2c4.com (mailing list archive)
Headers show
Series random: wire up in-kernel virtual machine fork notifications | expand

Message

Jason A. Donenfeld March 1, 2022, 11:10 p.m. UTC
As discussed, here is the notifier for learning when a virtual machine
forks, as well as a first use case for it, which is unsurprisingly
WireGuard, since I happen to know that case rather well.

The first patch is a small cleanup discovered when working on the second
patch, which is adding the actual notifier. The third case then
trivially adds it to WireGuard.

Jason A. Donenfeld (3):
  random: replace custom notifier chain with standard one
  random: provide notifier for VM fork
  wireguard: device: clear keys on VM fork

 drivers/char/random.c          | 82 ++++++++++++++--------------------
 drivers/net/wireguard/device.c | 27 +++++------
 include/linux/random.h         | 16 +++----
 lib/random32.c                 | 12 ++---
 lib/vsprintf.c                 | 10 +++--
 5 files changed, 69 insertions(+), 78 deletions(-)