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

Re: [PATCH] xen/livepatch: Fix secure_payload() in non-debug builds


  • To: Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • From: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
  • Date: Tue, 18 Apr 2023 15:36:21 +0000
  • Accept-language: en-US
  • 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=ycA6Nr7hkSnlbY67HxQ6qmBFbGODReNlBXl6mfGY1QE=; b=J1Mc07dzeoM0o3FA+KXZAMxy5csM7u2flElNTK2nCcaBZijFzRbIyTF0raX3QxYc25mmL7rOCdvM7uSrLl0UVS4Yu/qoh1rzX9FfXSK8vGlDHqAS7IWnM0LYPszFSrQjYvo/6cmzuWLy1fVJZ/Etb2fjXx2RCqp81uSuGxD0yRtbzWN9hdSPiJJi3untmMauRrsq7+WMl45zB/JYdGqxsuZBm2dm+awOrm8km6OfraLU/sWs7+SVIyypDRqbSeYF1iUeYrHQMrT/KCtsGlmv4hizs6SJRZ4LttvGvdo+aIFEleQj6S+vpVEsYXT5CxZ1WVOvlOJr3d0CLqGqwfV1Tw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gDy0nJ0hcTcBrzvr8nqABC5Af7HYjbxpguIol8KdFZmYAG3ntroxbGZgiba2eexyyEmCEnaEmwQa6yl8kb3kna95Pu/5FuJ3vuu3wRy7wnOGcAglgIrpv/HNCOMuAjjF81SS0C9CAEgYwjHHYI4h63UXx7c1JvE0n3K+Sw8R/YUu0BGZKcANEtSZ4i88ZVFtdPZiFdOqWF4kH4LOlo/6iLqoEIvJzGBaKlJ+4HIZUTTHjHkR3+/zi5n/17EbfzycKGvIe/hDlYVkl6b23bVHHdpCumEHQTWqWDfqwmwrNsuhxP4OFclW7XwoObf7YhNKQ1PCpOShg692fzJL7480iQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 18 Apr 2023 15:36:34 +0000
  • Ironport-data: A9a23:3FJjzqvPFfA8zleixr/UC1fofefnVGdfMUV32f8akzHdYApBsoF/q tZmKTzUPPfcYDGgfN10bN6z8x8BvJXVy941TAo5qS1nQS9D+JbJXdiXEBz9bniYRiHhoOCLz O1FM4Wdc5pkJpP4jk3wWlQ0hSAkjclkfpKlVKiffHg3HVQ+IMsYoUoLs/YjhYJ1isSODQqIu Nfjy+XSI1bg0DNvWo4uw/vrRChH4bKj6Vv0gnRkPaoQ5AOHxyFPZH4iDfrZw0XQE9E88tGSH 44v/JnhlkvF8hEkDM+Sk7qTWiXmlZaLYGBiIlIPM0STqkAqSh4ai87XB9JFAatjsB2bnsgZ9 Tl4ncfYpTHFnEH7sL91vxFwS0mSNEDdkVPNCSDXXce7lyUqf5ZwqhnH4Y5f0YAwo45K7W9yG fMwETcJYBC5qMGM26uXTcUygscGIM/FFdZK0p1g5Wmx4fcOZ7nmGv2PwOACmTA6i4ZJAOrUY NcfZXx3dhPcbhZTO1ARTpUjgOOvgXq5eDpdwL6XjfNvvy6Pk0osjf60aIu9lt+iHK25mm6Co XnduWDwDRwAK9WbzRKO8262h/+JliT+MG4XPOTgpqIz3gzMnQT/DjVVcWGar/2+g3T9WulmD nw6+CYf9ag9oRnDot7VGkfQTGS/lhwWVsdUEuY6wBqQ0aeS6AGcbkAHSThbYdBgq84yRhQtz FaCm96vDjtq2JWFRHTY+rqKoDeaPSkOMXREdSICVREC4dTovMc0lB2nczp4OKu8j9mwHC6qx TmP9XA6n+9K1Z9N0Lin91fahT7qvoLOUgM++gTQWCSi8x99Y4mmIYev7DA38Mp9EWpQdXHZ1 FBspiRUxLlm4U2l/MBVfNgwIQ==
  • Ironport-hdrordr: A9a23:NvhnAaphgSosUffZMXRApz0aV5oFeYIsimQD101hICG9E/b2qy nKpp8mPHDP+VEssR0b+OxoQZPwJE80lqQa3WBuB8bHYOC8ghrKEGgK1+KLqVCNJ8SZzJ866U 4KSchD4bPLfCNHZO/BkWuFOudl7N6b8L25wcfypk0dNz2CspsQljuR3DzranFLeA==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Msip_labels:
  • Thread-index: AQHZcRMmMLpASuHOmkGih8/02E4a3a8vUDkAgAHj1ME=
  • Thread-topic: [PATCH] xen/livepatch: Fix secure_payload() in non-debug builds

> From: Jan Beulich <jbeulich@xxxxxxxx>
> Sent: Monday, April 17, 2023 11:41 AM
> To: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
> Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>; Ross Lagerwall 
> <ross.lagerwall@xxxxxxxxxx>; Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
> Subject: Re: [PATCH] xen/livepatch: Fix secure_payload() in non-debug builds 
>  
> On 17.04.2023 11:58, Andrew Cooper wrote:
> > The ro_pages + rw_pages + text_pages != payload->pages check is not 
> > something
> > which is reasonable to skip at runtime.  Rewrite it to not be an ASSERT().
> 
> Isn't this merely a sanity check? IOW isn't returning -EINVAL in this case
> misleading, as to calling "invalid input" what really is an internal error
> in Xen? But anyway, I guess I'll leave this to the maintainers.
> 

Yes, it looks like it is just a sanity check of the payload->pages
calculation in move_payload(). Since it is not dependent on the
payload, I think ASSERT() is correct.

Ross


 


Rackspace

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