mbox series

[v4,00/17] tools/xenstore: do some cleanup and fixes

Message ID 20230118095016.13091-1-jgross@suse.com (mailing list archive)
Headers show
Series tools/xenstore: do some cleanup and fixes | expand

Message

Jürgen Groß Jan. 18, 2023, 9:49 a.m. UTC
This is a first run of post-XSA patches which piled up during the
development phase of all the recent Xenstore related XSA patches.

This is a mixture of small fixes, enhancements and cleanups.

Changes in V4:
- reordered the patches a little bit (patch 4 and patch 17 of V4 have
  been moved)
- addressed comments

Changes in V3:
- patches 2, 3, and 5 of V2 have been applied already
- new patch 12
- addressed comments

Changes in V2:
- patches 1+2 of V1 have been applied already
- addressed comments
- new patch 19

Juergen Gross (17):
  tools/xenstore: let talloc_free() preserve errno
  tools/xenstore: remove all watches when a domain has stopped
  tools/xenstore: add hashlist for finding struct domain by domid
  tools/xenstore: make log macro globally available
  tools/xenstore: introduce dummy nodes for special watch paths
  tools/xenstore: replace watch->relative_path with a prefix length
  tools/xenstore: move changed domain handling
  tools/xenstore: change per-domain node accounting interface
  tools/xenstore: replace literal domid 0 with dom0_domid
  tools/xenstore: make domain_is_unprivileged() an inline function
  tools/xenstore: let chk_domain_generation() return a bool
  tools/xenstore: don't let hashtable_remove() return the removed value
  tools/xenstore: switch hashtable to use the talloc framework
  tools/xenstore: introduce trace classes
  tools/xenstore: let check_store() check the accounting data
  tools/xenstore: make output of "xenstore-control help" more pretty
  tools/xenstore: don't allow creating too many nodes in a transaction

 docs/misc/xenstore.txt                 |  10 +-
 tools/xenstore/hashtable.c             | 103 ++--
 tools/xenstore/hashtable.h             |   6 +-
 tools/xenstore/talloc.c                |  21 +-
 tools/xenstore/xenstored_control.c     |  36 +-
 tools/xenstore/xenstored_core.c        | 261 +++++++----
 tools/xenstore/xenstored_core.h        |  39 ++
 tools/xenstore/xenstored_domain.c      | 620 +++++++++++++------------
 tools/xenstore/xenstored_domain.h      |  21 +-
 tools/xenstore/xenstored_transaction.c |  76 +--
 tools/xenstore/xenstored_transaction.h |   7 +-
 tools/xenstore/xenstored_watch.c       |  36 +-
 12 files changed, 653 insertions(+), 583 deletions(-)

Comments

Julien Grall Jan. 20, 2023, 9:25 a.m. UTC | #1
Hi Juergen,

On 18/01/2023 09:49, Juergen Gross wrote:
> This is a first run of post-XSA patches which piled up during the
> development phase of all the recent Xenstore related XSA patches.
> 
> This is a mixture of small fixes, enhancements and cleanups.
> 
> Changes in V4:
> - reordered the patches a little bit (patch 4 and patch 17 of V4 have
>    been moved)
> - addressed comments
> 
> Changes in V3:
> - patches 2, 3, and 5 of V2 have been applied already
> - new patch 12
> - addressed comments
> 
> Changes in V2:
> - patches 1+2 of V1 have been applied already
> - addressed comments
> - new patch 19
> 
> Juergen Gross (17):
>    tools/xenstore: let talloc_free() preserve errno
>    tools/xenstore: remove all watches when a domain has stopped
>    tools/xenstore: add hashlist for finding struct domain by domid
>    tools/xenstore: make log macro globally available
>    tools/xenstore: introduce dummy nodes for special watch paths
>    tools/xenstore: replace watch->relative_path with a prefix length
>    tools/xenstore: move changed domain handling
>    tools/xenstore: change per-domain node accounting interface
>    tools/xenstore: replace literal domid 0 with dom0_domid
>    tools/xenstore: make domain_is_unprivileged() an inline function
>    tools/xenstore: let chk_domain_generation() return a bool
>    tools/xenstore: don't let hashtable_remove() return the removed value
>    tools/xenstore: switch hashtable to use the talloc framework
>    tools/xenstore: introduce trace classes
>    tools/xenstore: let check_store() check the accounting data
>    tools/xenstore: make output of "xenstore-control help" more pretty

I have committed up to this patch. The last one...

>    tools/xenstore: don't allow creating too many nodes in a transaction

... needs some review which I will do with part 2 of the xenstored series.

Cheers,
Jürgen Groß Jan. 20, 2023, 9:36 a.m. UTC | #2
On 20.01.23 10:25, Julien Grall wrote:
> Hi Juergen,
> 
> On 18/01/2023 09:49, Juergen Gross wrote:
>> This is a first run of post-XSA patches which piled up during the
>> development phase of all the recent Xenstore related XSA patches.
>>
>> This is a mixture of small fixes, enhancements and cleanups.
>>
>> Changes in V4:
>> - reordered the patches a little bit (patch 4 and patch 17 of V4 have
>>    been moved)
>> - addressed comments
>>
>> Changes in V3:
>> - patches 2, 3, and 5 of V2 have been applied already
>> - new patch 12
>> - addressed comments
>>
>> Changes in V2:
>> - patches 1+2 of V1 have been applied already
>> - addressed comments
>> - new patch 19
>>
>> Juergen Gross (17):
>>    tools/xenstore: let talloc_free() preserve errno
>>    tools/xenstore: remove all watches when a domain has stopped
>>    tools/xenstore: add hashlist for finding struct domain by domid
>>    tools/xenstore: make log macro globally available
>>    tools/xenstore: introduce dummy nodes for special watch paths
>>    tools/xenstore: replace watch->relative_path with a prefix length
>>    tools/xenstore: move changed domain handling
>>    tools/xenstore: change per-domain node accounting interface
>>    tools/xenstore: replace literal domid 0 with dom0_domid
>>    tools/xenstore: make domain_is_unprivileged() an inline function
>>    tools/xenstore: let chk_domain_generation() return a bool
>>    tools/xenstore: don't let hashtable_remove() return the removed value
>>    tools/xenstore: switch hashtable to use the talloc framework
>>    tools/xenstore: introduce trace classes
>>    tools/xenstore: let check_store() check the accounting data
>>    tools/xenstore: make output of "xenstore-control help" more pretty
> 
> I have committed up to this patch. The last one...
> 
>>    tools/xenstore: don't allow creating too many nodes in a transaction
> 
> ... needs some review which I will do with part 2 of the xenstored series.

I'll do a resend of the part 2 rebased to the committed stuff, including
this leftover patch.


Juergen