[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH for-4.17?] x86/paging: return -EINVAL for paging domctls for dying domains
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Wed, 9 Nov 2022 12:36:38 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QERGUx8m5H+C4Omw+Dd2zraCUltqFgWBQDjjoKeUHEw=; b=J0b+UBpM6bG3mmom2IMQxKpcz/2ylwPTs85BhMcemMhgWZtk68lU7b8RrDKMoRO/akS5o034wXv314UfbUFhzVYJAnMtS2wJeWMVSDiVFEEG5iDSxtv4nasqaagyazfn4WMRzcYbnY8h7auK2NuooBlTkqVExOZrejMrIVOaAxSUE/LQwMJIA48lVt0mxQx/30O4wee+q4ku0AYdeHtuQjcoN45f4Nck5rOojEve2BanVIMPwZWxcePV6cSy48FsPnhdZAIRgHhtOqC8ZFdNPPKQRmPFd4VCvUIPVJqq8zyz5jwdBsH8z3/wNxIe/E7Ea9jm3aulh0YtYkhN5MgMZw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HXOxOON1YBMz9+7nRqmKIg0bcvYaYp8CVK2vO6mOgVOjSAfnVPxXGZHoPMswO9aWOiIAirLqcBNK27qfFWRqAKGl5WRM58XgHej3n4ZZVra3zrFCuMXWcnnWeM8cpT+JCIOoWAlApzYVRRQD6Rp3eSrRVsuSrcFQZgkpWW3qDjEi4E4KAuK3eAiWnnIFNKPtfxEKUcKTXysO7blmSBW9GlZOFamzrbYTUbpbiNjC6XYS2905wQQWuUaWUg8BxYbPiWwYGgKHksoeh15oflrHsspdKtNmke6oT6uyHzSA/EEaN6uVCxycE8g7fzwbtsTz9MIYg82waunUsDTzjYUhSg==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Henry.Wang@xxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Edwin Török <edvin.torok@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Wed, 09 Nov 2022 11:37:02 +0000
- Ironport-data: A9a23:hmRZIq8qu/zZZj6jyG6GDrUDs3+TJUtcMsCJ2f8bNWPcYEJGY0x3x zdKX2zTbvaNazGheo0kbovi905TscDRztMxHQs6+388E34SpcT7XtnIdU2Y0wF+jCHgZBk+s 5hBMImowOQcFCK0SsKFa+C5xZVE/fjUAOG6UKucYHsZqTZMEE8JkQhkl/MynrlmiN24BxLlk d7pqojUNUTNNwRcawr40Ire7kIx1BjOkGlA5AZnPKga5AW2e0Q9V/rzG4ngdxMUfaEMdgKKb 76r5K20+Grf4yAsBruN+losWhRXKlJ6FVHmZkt+A8BOsDAbzsAB+v9T2M4nQVVWk120c+VZk 72hg3ASpTABZcUgkMxFO/VR/roX0aduoNcrKlDn2SCfItGvn9IBDJyCAWlvVbD09NqbDklU7 PMBCiAJcim/nuPqx7+HZ9dQvs48eZyD0IM34hmMzBn/JNN/GNXvZvuP4tVVmjAtmspJAPDSI dIDbiZiZwjBZBsJPUoLDJU5n6GjgXyXnz9w8QrJ4/ZopTWMilUvgdABM/KMEjCObd9SkUuC4 HrP4kzyAw0ANczZwj2Amp6prr+QxXujBt5PfFG+3sRHh1Kt5TIeM0IfeBiHuOaIu0ruQM0Kf iT4/QJr98De7neDTNPwQhm5q36spQMHVpxbFOhSwCGAzLDFpTmQAGcsRyRELtchsaceWjgCx lKP2dTzClRHoLCTDH6Q6LqQhTezIjQOa38PYzceSgkI6MWlp5s85i8jVf5mGa+xy9HwRzf5x mnTqDBk3utCy8kWy6+84FbLxSq2oYTERRI04QORWX+56gR+Z8iuYInABUXn0Mus5b2xFjGp1 EXoUeDHhAzSJflhTBCwfdg=
- Ironport-hdrordr: A9a23:YyeiA6ByzsvNuF3lHekp55DYdb4zR+YMi2TDt3oadfU1SL37qy nAppgmPHPP5wr5O0tQ+uxoWpPgfZq0z/ccjLX5VY3IYOCMgguVxe9Zg7cLw1fbalXDHuw279 YaT0CpYueAd2STjqzBkXSF+85L+qjjzImYwd3w4l0odg1xdrph5RoRMHfmLqVxLjM2YaYRJd 6nyedsgSGvQngTZtTTPAh9Y8Hz4+flubjcbRsPFzYr5RLmt0LW1JfKVyK28z0kXzZG0Y4l6n WtqX2G2oyT98uV5zXg8lW71eUmpDOwouEzY/Blk6IuW1PRtjo=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Wed, Nov 09, 2022 at 11:23:01AM +0100, Jan Beulich wrote:
> 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.
Right, both are domctls. There are other places where is_dying get
set as part of failures in the domain create paths, but then the
paging domctl failing would be natural, as the domain is being
destroyed as part of a failed domain create.
Since I don't see replies to my other comments, do you agree on
returning an error then?
Thanks, Roger.
|