All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: Henry.Wang@arm.com, "Andrew Cooper" <andrew.cooper3@citrix.com>,
	"George Dunlap" <george.dunlap@citrix.com>,
	"Wei Liu" <wl@xen.org>, "Edwin Török" <edvin.torok@citrix.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH for-4.17?] x86/paging: return -EINVAL for paging domctls for dying domains
Date: Wed, 9 Nov 2022 11:23:01 +0100	[thread overview]
Message-ID: <afbc37a1-99cb-ea09-575e-dc6448cd6f92@suse.com> (raw)
In-Reply-To: <Y2t87YE5acLfiClF@Air-de-Roger>

On 09.11.2022 11:11, Roger Pau Monné wrote:
> On Wed, Nov 09, 2022 at 08:48:46AM +0100, Jan Beulich wrote:
>> Finally I'm not convinced of the usefulness of this dying check in the
>> first place: is_dying may become set immediately after the check was
>> done.
> 
> While strictly true, this code is executed with the domain lock held,
> so while is_dying might change, domain_kill() won't make progress
> because of the barrier on the domain lock just after setting is_dying.

I guess I'm confused now: This code is called with the domctl lock
held, which - as said before - is a questionable thing, for serializing
things more than necessary as well as for holding this lock for
excessive periods of time. IOW I consider it wrong to depend on that
in paging_domctl() to synchronize against domain_kill(). Yet indeed that
should eliminate races at present.

Jan


  reply	other threads:[~2022-11-09 10:23 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-08 11:38 [PATCH for-4.17?] x86/paging: return -EINVAL for paging domctls for dying domains Roger Pau Monne
2022-11-08 16:14 ` Jan Beulich
2022-11-08 16:43   ` Roger Pau Monné
2022-11-08 17:03     ` Jan Beulich
2022-11-08 17:15       ` Roger Pau Monné
2022-11-09  7:48         ` Jan Beulich
2022-11-09  9:45           ` Edwin Torok
2022-11-09  9:58             ` Jan Beulich
2022-11-09 10:11           ` Roger Pau Monné
2022-11-09 10:23             ` Jan Beulich [this message]
2022-11-09 11:36               ` Roger Pau Monné
2022-11-09 12:02                 ` Jan Beulich
2022-11-09 13:22                   ` Roger Pau Monné
2022-11-10  9:03                     ` Jan Beulich
2022-11-08 17:30     ` Edwin Torok
2022-11-09 16:11 ` Andrew Cooper
2022-11-10  9:02   ` Jan Beulich

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=afbc37a1-99cb-ea09-575e-dc6448cd6f92@suse.com \
    --to=jbeulich@suse.com \
    --cc=Henry.Wang@arm.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=edvin.torok@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=wl@xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.