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

Re: xen | Failed pipeline for staging | 6a47ba2f


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 2 May 2023 08:53:31 +0200
  • 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=KrLqDwXogvWTiVrkF8oSNrFfbNIE+diqB/eY+7SfAGE=; b=BdiNKGBJiP10df1M7B4H4J+kt4HNcLKqiRV52JZAJEkMQQpTGRGpuehAWmge6JIMywD/bjfjlwgUlV5zUmGG3PFz+2EH3s5/JHt0reV+rQv8rO560zOLdsiGKbB1cIHvU1TA6HpphMlTabzDPtlErDb+9F050E5vXR2j3S1a7vVG6lN4zZ6IfSx0LpTBp+DnlJH0qP4LvIjh8HJCW10o174bvoDR7myE7wwVEHBd6atnjFWGi8u8GNWhz/O9f0FiElbjlgC9wHhM7qLwxVNpaWX5FQeYPBKA12DOzBlA4Rw5kKGcuEZ+1gq2c3CMEIAZg5JNmNbg8g7ROiHqJtSByw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nNp8q5CcnOl/0AUeIHGQ+6W6OpdVzdWScnUcpbXQ4dKoGbMYaEA7XH14J/fQMonyo+j3YlYRyF0WczBn8N8BzAOAk3GxjqVYPGy8MtpxDWdH6yEYWx482zCoJhIeGDY8i4tsXUGKgIemF/p4knCLlvIxvNPCNONCLcZyzSYKfgGNGtlEAcIQM6kfD0/NlZTy0tP5XdqSCLGJ2p0ttUV6yvqs5iOCKW7QJIuR/5PGIQ4iHPg36l1BGIjizACY5vex0pIRwt5mC0iZ0aEYwFb438CJL1p0TOidAMg7+QrYgg2sLkHw911bABEqStO+DKSsubjSSzrDZEeasu5GFENqng==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: andrew.cooper3@xxxxxxxxxx, alejandro.vallejo@xxxxxxxxx, committers@xxxxxxxxxxxxxx, michal.orzel@xxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 02 May 2023 06:53:56 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 02.05.2023 05:59, Stefano Stabellini wrote:
> xen: fix broken XEN_SYSCTL_getdomaininfolist hypercall
> 
> XEN_SYSCTL_getdomaininfolist doesn't actually update the guest
> num_domains field, only its local copy. Fix that.

This isn't true, at least not always / unconditionally. "copyback" is
what controls copying back of the entire struct, and in the success
case this looks to be happening fine. Yet for the failure case it's
unclear whether any copying back is actually intended. (If the op was
to return merely the number of active domains, I think that ought to
be restricted to max_domains == 0 and the handle also being a null
one.

I'm also having a hard time seeing what failure case the test ended
up encountering: There are only two errors which can occur - one
from the XSM hook (which is mishandled, and I'll make a separate
patch for that) and the other from failing to copy back the info for
the domain being looked at. I hope we can exclude the former, so are
you suggesting the info struct copy-back is failing in your case?

> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx>

In any event, if anything needs fixing here, a Fixes: tag would be
nice.

Jan

> diff --git a/xen/common/sysctl.c b/xen/common/sysctl.c
> index 02505ab044..0e1097be96 100644
> --- a/xen/common/sysctl.c
> +++ b/xen/common/sysctl.c
> @@ -107,10 +107,8 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) 
> u_sysctl)
>          
>          rcu_read_unlock(&domlist_read_lock);
>          
> -        if ( ret != 0 )
> -            break;
> -        
>          op->u.getdomaininfolist.num_domains = num_domains;
> +        __copy_field_to_guest(u_sysctl, op, u.getdomaininfolist.num_domains);
>      }
>      break;
>  




 


Rackspace

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