From: "Jürgen Groß" <jgross@suse.com>
To: Dongli Zhang <dongli.zhang@oracle.com>,
xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org
Cc: boris.ostrovsky@oracle.com, sstabellini@kernel.org,
joe.jin@oracle.com, rose.wang@oracle.com
Subject: Re: [PATCH 1/1] xen/manage: enable C_A_D to force reboot
Date: Fri, 15 May 2020 09:01:12 +0200 [thread overview]
Message-ID: <e604a96d-087e-573b-c3bf-fc53005f8994@suse.com> (raw)
In-Reply-To: <20200513233410.18120-1-dongli.zhang@oracle.com>
On 14.05.20 01:34, Dongli Zhang wrote:
> The systemd may be configured to mask ctrl-alt-del via "systemctl mask
> ctrl-alt-del.target". As a result, the pv reboot would not work as signal
> is ignored.
>
> This patch always enables C_A_D before the call of ctrl_alt_del() in order
> to force the reboot.
Hmm, I'm not sure this is a good idea.
Suppose a guest admin is doing a critical update and wants to avoid a
sudden reboot in between. By masking the reboot this would be possible,
with your patch it isn't.
In case a reboot is really mandatory it would still be possible to just
kill the guest.
I'm not completely opposed to the patch, but I think this is a change
which should not be done easily.
Juergen
>
> Reported-by: Rose Wang <rose.wang@oracle.com>
> Cc: Joe Jin <joe.jin@oracle.com>
> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
> ---
> drivers/xen/manage.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c
> index cd046684e0d1..3190d0ecb52e 100644
> --- a/drivers/xen/manage.c
> +++ b/drivers/xen/manage.c
> @@ -204,6 +204,13 @@ static void do_poweroff(void)
> static void do_reboot(void)
> {
> shutting_down = SHUTDOWN_POWEROFF; /* ? */
> + /*
> + * The systemd may be configured to mask ctrl-alt-del via
> + * "systemctl mask ctrl-alt-del.target". As a result, the pv reboot
> + * would not work. To enable C_A_D would force the reboot.
> + */
> + C_A_D = 1;
> +
> ctrl_alt_del();
> }
>
>
next prev parent reply other threads:[~2020-05-15 7:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-13 23:34 Dongli Zhang
2020-05-15 7:01 ` Jürgen Groß [this message]
2020-05-15 17:26 ` Boris Ostrovsky
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=e604a96d-087e-573b-c3bf-fc53005f8994@suse.com \
--to=jgross@suse.com \
--cc=boris.ostrovsky@oracle.com \
--cc=dongli.zhang@oracle.com \
--cc=joe.jin@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rose.wang@oracle.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/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®