[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Nonsensical XSM Flask denial


  • To: Jason Andryuk <jandryuk@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 18 Mar 2022 10:01:41 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=LBvfo5w8LlWNK7POjcgvlgJfeaTqYWkwCSgRq6O1O+8=; b=Gkcx8j62jb1spSVyxGiDF3vb6rlpzMm/A9hCiBkAM5BzT2S5jws99uvUMAZO+/itQRt+/PdbFcbEmthfxkymanvGAMrhbgUqXSOAdgoDOFP47Fw1PkjNc832WF7XiJLPiuMkO+NxEl5wNKJV2DfYyqrFH3om6Mlt7nYdI9ttX/GGvOubNNuALeCXagiL4VYJxmHtkCkED6SwtXSSS6wiASRFtMvNzdpr9UFLGAE3dIKVExHdJOUlk3ZkYUcKLgJJ5blIVMHVbsq7G2jaujSpGzvpON2VYkR86ldOGBFWYbR0UjuBP5iZz9d4G4PLH+Zn1/9nDPPVnMm3iF4tXwoh8Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l+3wEqQvYQHfpVp3q5eCMXeUL36C9RWFjo6GE3fvuK0uhy3iLox39PGtz7uSLE6VOZ0pYKRo/OePBVCR3RpZ9xqFaMY3wFBIv4uR3+tYTRkMVAGY0r4F9d4LVi69z+0KECluiWlA9VEcnTLbJTnlLchVgyqTgQ4pBn0dlZ9HeJGOs7ejpP6abuCbsdgwiP55yhMnqg6pVuyfYXX835sBG5QD1xTtG+VEZB+DdNU9IUw435tYk1t3i3LNgtdODcups6vlwcv9MwzXiuovCPu/Zg079Kusj72L1FpNN6gHPeP/+44K0m4V5x3nDP9sjgvp8Ss5u8Q18WBQGSoD0friYw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • Delivery-date: Fri, 18 Mar 2022 09:01:54 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 17.03.2022 20:02, Jason Andryuk wrote:
> On Thu, Mar 17, 2022 at 2:14 PM Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx> 
> wrote:
>>
>> On 17/03/2022 17:52, Jason Andryuk wrote:
>>> I shut down a domU (HVM dom9 w/ Linux stubdom dom10) with a single PCI
>>> device assigned.  Xen logged the following Flask denial for a second
>>> PVH dom5 (uivm) without any PCI devices assigned.  This is Xen 4.14.4.
>>>
>>> (XEN) avc:  denied  { remove_irq } for domid=5 irq=17
>>> scontext=system_u:system_r:uivm_t
>>> tcontext=system_u:object_r:shared_irq_t tclass=resource
>>>
>>> Domain 5 as uivm_t and irq 17 as shared_irq_t both look correct.  But
>>> it doesn't make sense that uivm would make a hypercall for an irq.
>>>
>>> Could this be from RCU calling complete_domain_destroy() when current
>>> is dom5 (uivm)?  What would current be set to when RCU runs its
>>> callbacks?
>>
>> RCU runs in softirq context, so yes - (almost) any use of current would
>> be bogus.
>>
>> But I can't spot any overlap between the physdevop_unmap_pirq XSM check,
>> and complete_domain_destroy().
>>
>> Any chance you can reproduce this with a WARN() in the AVC denied path,
>> so we can see what's going on here?
> 
> The path I found reading is:
> complete_domain_destroy
>   arch_domain_destroy
>     free_domain_pirqs
>       unmap_domain_pirq
>         xsm_unmap_domain_irq

I wonder whether an XSM check makes sense here at all for a dying
domain.

Jan




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.