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

Re: [PATCH v2 3/6] xen: xenstore: add possibility to preserve owner


  • To: David Woodhouse <dwmw2@xxxxxxxxxxxxx>
  • From: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Date: Wed, 22 Nov 2023 23:03:41 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.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=KKQStBJ0n34/GtNYI3bkE9Ujumx7nqq7ddAEpl7PQAI=; b=DMgmmHx5VjAyne23HkJEqBH4nzghJDhtGUnwTgOrx+yykn04IWCsH147N4CN93J/l/ZrBmEX1Iy96CTo46dGK3m+dGNnykO0KEeOE1+4yo2PEzeYFh/9ZwS551Rww8qg+q47fHC7KhBidN9KnQtXHumbKhjYV47XWIbTcA1u1RuOBX8gLHf7Iol4swMKiccAeWU4L8sGHHWkZ8HQhEw66NlPiBi2nmBYHabm4dU7YyjY4wN8cMkFAQmHqRrTaNFV9nH3JcT05nRO/Yd1CMv1hBCQuLDedGp1+r9lUTKjIT/hPgt9UjwTiY3gcKpEx6Kwta3f5+zolHtV/9YQ0QC5Mg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QsIdvIhwuv0KCMQJj9IISzVNOn35ZmM0p2NbP0Mz8IoHt3bp9/ROK7AnPEcweTEOS4JipHYf7v75lJKN95OPixAFh+5sMgwelXnNQZVkYn+31ys6+8NKb85HrM/UUoK5coPGAS5qDafm+QJ9TpSQAFrIHOHtbhYCp9gYyIIQoNkW6x8EC1Nr++YHTW9FujsZhUiyYzminY7xTngXVXFngb84HGd783ufez+kqqWEOOXIAgFf9OT9Pr6g10S9NkSZ3YcdZWXTzxGwk61r5naOYIce3E1Qm1IYrgR3lqTAmatiBzLsewhzM4ueKDp74s2gSRVLTWzNwBaP3ZzUgTcvOw==
  • Cc: "qemu-devel@xxxxxxxxxx" <qemu-devel@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Paul Durrant <paul@xxxxxxx>, "Michael S. Tsirkin" <mst@xxxxxxxxxx>, Marcel Apfelbaum <marcel.apfelbaum@xxxxxxxxx>, Paolo Bonzini <pbonzini@xxxxxxxxxx>, Richard Henderson <richard.henderson@xxxxxxxxxx>, Eduardo Habkost <eduardo@xxxxxxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>, "open list:X86 Xen CPUs" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 22 Nov 2023 23:04:32 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHaHMeI3Gf8Xs6dHUOphRyadMs2o7CG9fUAgAAASgA=
  • Thread-topic: [PATCH v2 3/6] xen: xenstore: add possibility to preserve owner

Hi David,

David Woodhouse <dwmw2@xxxxxxxxxxxxx> writes:

> [[S/MIME Signed Part:Undecided]]
> On Tue, 2023-11-21 at 22:10 +0000, Volodymyr Babchuk wrote:
>> 
>> --- a/hw/xen/xen-operations.c
>> +++ b/hw/xen/xen-operations.c
>> @@ -300,6 +300,18 @@ static bool libxenstore_create(struct qemu_xs_handle 
>> *h, xs_transaction_t t,
>>          return false;
>>      }
>>  
>> +    if (owner == XS_PRESERVE_OWNER) {
>> +        struct xs_permissions *tmp;
>> +        unsigned int num;
>> +
>> +        tmp = xs_get_permissions(h->xsh, t, path, &num);
>> +        if (tmp == NULL) {
>> +            return false;
>> +        }
>> +        perms_list[0].id = tmp[0].id;
>> +        free(tmp);
>> +    }
>> +
>>      return xs_set_permissions(h->xsh, t, path, perms_list,
>>                                ARRAY_SIZE(perms_list));
>>  }
>
> If the existing transaction is XBT_NULL I think you want to create a
> new transaction for it, don't you?

As per Stefano's and Paul's comments I'll drop this patch
completely. Thanks for review, thought.

-- 
WBR, Volodymyr

 


Rackspace

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