From: Babis Chalios <bchalios@amazon.es>
To: <tytso@mit.edu>, <Jason@zx2c4.com>, <linux-kernel@vger.kernel.org>
Cc: <graf@amazon.de>, <mzxreary@0pointer.de>, <xmarcalx@amazon.co.uk>,
<gregkh@linuxfoundation.org>, Babis Chalios <bchalios@amazon.es>
Subject: [PATCH 0/1] Notify system services about VM clones
Date: Tue, 30 Jul 2024 11:48:30 +0200 [thread overview]
Message-ID: <20240730094831.882166-1-bchalios@amazon.es> (raw)
Hi Jason,
This is a rebase of the previous patch[1] that enabled VMGenID to send a
uevent notification to user space. I have rebased it on top of current
Linus's master branch, which includes the changes to add DT support to
VMGenID, and fixed the conflicts.
The simple problem this solves is sending a notification to user space
services, like networkd et al, chrony, etc., that they are now working
on a new VM. The former would do things like refresh DHCP leases, the
latter would reset the system's clock to current date and time. This is
a problem quite common in the VM world. Apart from us, systemd folks
have chimed in the past with their use-cases[2][3].
Previously, you have mentioned that you envision this being handled by
random.c due to the fact that it receives such events from a variety of
devices[4][5], hence it should be the one dispatching the notification
to user space.
I am resending this because I believe the above rationale is conflating
two different events, i.e. "you have stale entropy" and "your VM has
been cloned". The latter implies the former, but there are use cases
other than reseeding PRNGs; some of them I mentioned earlier in this
cover letter. In practical terms, we should not regenerate MAC addresses
whenever we need to reseed our PRNGs. And I simply cannot think of any
other device that could trigger an effect on networkd, chrony, etc,
similar to the one VMGenID updates do.
I am really interested in your thoughts on this and, ultimately, I hope
we can have a technical discussion on the arguments above and try to
find the best solution for the problem at hand.
Cheers,
Babis
[1] https://lore.kernel.org/lkml/20230531095119.11202-1-bchalios@amazon.es/
[2] https://lore.kernel.org/lkml/ZieoRxn-On0gD-H2@gardel-login/
[3] https://lore.kernel.org/lkml/ZJGNREN4tLzQXOJr@gardel-login/
[4] https://lore.kernel.org/lkml/CAHmME9pVLD-U+iYfv7=HBufRtaSkBmCRpKLH8pbvPNkgozE3cg@mail.gmail.com/
[5] https://lore.kernel.org/lkml/Ziujox51oPzZmwzA@zx2c4.com/
Babis Chalios (1):
vmgenid: emit uevent with new generation ID
drivers/virt/vmgenid.c | 2 ++
1 file changed, 2 insertions(+)
--
2.34.1
next reply other threads:[~2024-07-30 9:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-30 9:48 Babis Chalios [this message]
2024-07-30 9:48 ` [PATCH 1/1] vmgenid: emit uevent with new generation ID Babis Chalios
2024-07-30 11:32 ` Luca Boccassi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240730094831.882166-1-bchalios@amazon.es \
--to=bchalios@amazon.es \
--cc=Jason@zx2c4.com \
--cc=graf@amazon.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mzxreary@0pointer.de \
--cc=tytso@mit.edu \
--cc=xmarcalx@amazon.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®