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

RE: [PATCH][4.17] x86/shadow: drop (replace) bogus assertions


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Mon, 24 Oct 2022 13:40:21 +0000
  • Accept-language: zh-CN, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; 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=j0ItPbOspEdCHok4Ih/WxAAsJ2IOsyYpmPSTWbnXDn0=; b=EqqrJ0t90/qvNmT7U1lnaoUfXSG5gf6N3aNWPUxdYQu39DzqQ+YUDy+XdLfYxrpcnza+qrLStevLg49L5GMkXTIiyrw1jAy1nPW9vL6vO1Tcx5CScFN5/Fml+oVJ+MFir1GS2V6iNcREktoSwNds7ArE1dJ7DOeWqDxANfeiLpsnpQaao4kSVYIQ1tCmF+YHNacBxKLbdM+3jdisJ2GAiX4iqXueNqzFZbpZ7Ls1hf05XkVnlKwfVLyL7qN6Z2UGuWjwWv/TWCQFHbYDspTyZ1sGsNJ/IVM8TL9IhgO2/7CvhLgQ4sfZvYtvhlgS0jDYoCCC8I6BwiNLv6yELk0VyA==
  • 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=j0ItPbOspEdCHok4Ih/WxAAsJ2IOsyYpmPSTWbnXDn0=; b=A8V6dXkzKiZg/dTFnxI2asWPThzJsQIPdb57CmRwWCUBa30oewrrL/+7dwDwJBcyBMCIp8jUcM6SI51rOJds54Gok+ZvCozJ7s7tZE81+nHHyFH1eQZL72JNplJB1zQ/w9nGEdyTvpXNZ1Dfk7ZEdKcA5UxoglrLhTUVQQNdzJBAEfm0+69lqigqhDivd19Nr5LopR6sD4DRHVjYCzpHUyr55TznGMkiCPFRtgwxIBcP2vqFaHU3p4h72ZEawZSBsIlblH0rO9mIz1zX49TFkU9AGB8L+fBT32BBQc+Ciuj8aCyUW6KmBI6dMV5HKB9mdVylO7cCvMF4mLz52u7bFQ==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=DzNxL7qpTU84HtqNhZlDhv31qd1Ma1QCbO59aMN2tz6raIwKy+m1kKZ8Sd4/uDS32mCHN/NIVKs1UJAlUuZdEcMitpx958mS+4gisSdsz+9K9d521CWTnN/b98wZXRUeCOOdQ16dsqyC2sm9hVgTDrQUFDdqFOmIPhAU3rhj4UJ7NBbC81JXXlG6zMMqTM8rraqY7FIsyAFESTAIEBiu6FgmPF71z75vgeCBwPhHKL292Ra6QBhB0QgACdxYlIFVawcRMz3HINUVnKLIidi2zPGN49vaElXZqYIHWXDH96Fcc5NvzDZDP5QoopbfPu75ySZruM8c7keLEqLX3HNgig==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JTQVexDiI0On6rS/t/6HYxLGGW5ZOwVdw8ma8ne2hdCKzgxk2STy3EBO1cRAXuRuyv/2elipJTG4YpLeYz2ub2lACEClo0Xxf3WlUTVWsemdE35WIMkb8QxZJSRPKS5PWMlQeH3KL5XOssrQOMQo1ZnyQ6PwgPCdpm5hQUIh2pIhMify2mNINcNAODJu4iygLI6Qe9sCDEo53Dv5i8VwSLSjDZIxsxvd4JUTr5BXGVF0wM+JXwkANd1uAAmb6Un08KGdQ9qYYw6ulXeDveJ8OUm12MACd6QPcCWqYE89QR1XI8F38LZqHGKIsmzm2VqGdNo3+wBZ1bVtq3r/sU1d5A==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Tim Deegan <tim@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Mon, 24 Oct 2022 13:40:40 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHY36n+iILu5HD1FUmlvrXgbBOgba4NsKGAgA/rWACAAADm4A==
  • Thread-topic: [PATCH][4.17] x86/shadow: drop (replace) bogus assertions

Hi Jan,

> -----Original Message-----
> From: Jan Beulich <jbeulich@xxxxxxxx>
> Subject: Re: [PATCH][4.17] x86/shadow: drop (replace) bogus assertions
> 
> On 14.10.2022 12:30, Roger Pau Monné wrote:
> > On Fri, Oct 14, 2022 at 10:49:55AM +0200, Jan Beulich wrote:
> >> The addition of a call to shadow_blow_tables() from shadow_teardown()
> >> has resulted in the "no vcpus" related assertion becoming triggerable:
> >> If domain_create() fails with at least one page successfully allocated
> >> in the course of shadow_enable(), or if domain_create() succeeds and
> >> the domain is then killed without ever invoking XEN_DOMCTL_max_vcpus.
> >>
> >> The assertion's comment was bogus anyway: Shadow mode has been
> getting
> >> enabled before allocation of vCPU-s for quite some time. Convert the
> >> assertion to a conditional: As long as there are no vCPU-s, there's
> >> nothing to blow away.
> >>
> >> Fixes: e7aa55c0aab3 ("x86/p2m: free the paging memory pool
> preemptively")
> >> Reported-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> >>
> >> A similar assertion/comment pair exists in _shadow_prealloc(); the
> >> comment is similarly bogus, and the assertion could in principle trigger
> >> e.g. when shadow_alloc_p2m_page() is called early enough. Replace
> those
> >> at the same time by a similar early return, here indicating failure to
> >> the caller (which will generally lead to the domain being crashed in
> >> shadow_prealloc()).
> >
> > It's my understanding we do care about this because a control domain
> > could try to populate the p2m before calling XEN_DOMCTL_max_vcpus,
> and
> > hence could trigger the ASSERT, as otherwise asserting would be fine.
> >
> >> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> >
> > Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> 
> In a discussion amongst maintainers we've settled Andrew's reservations.
> May I please ask for a release-ack for this change, so it can go in (as
> a bug fix on top of the recent batch of XSAs)?

Absolutely. Thanks for noticing.

Release-acked-by: Henry Wang <Henry.Wang@xxxxxxx>

Kind regards,
Henry

> 
> Thanks, Jan

 


Rackspace

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