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

Re: xenstore_lib.h and libxenstore API/ABI problems


  • To: Jürgen Groß <jgross@xxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Tue, 2 Mar 2021 16:54:14 +0000
  • 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-SenderADCheck; bh=e5yUiqCvuD4f+50vBDftQB9thcofM4ETGq9kM1dZUXA=; b=AwROahZyRR/T9noj2x4yzOmi5s4Sw2V2SAo4kkr3GDHovZFwG6wDUavcu8E8xrm6efoNudEoz0J9bwoF+FsTgSKEfGtDphRJaRNBYemHb0RR4K7Cdw92KG0IOi1jwWoCe1+BbXrei4LR9gSg4VK2PHeJ2rYNQ8jSLsM0yBY1ucdY1MHtz2ZYCqJdaMMS0gi1IPapQ/w3GZ7S81lZW/L/tW6zBzO18ozHMq29yNU/rJq7qLSPUR+zXrJkmaedmdzK1AgOWDYtS05pkpx+9HXUfihc53hr5Uq8u1pp0B8iQMPs92EWGQPo/sxb4Bmzq5X0dUGXebjYGCRBRKX7e47cPg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bQyAx26lC0T+WhMAaHV8AaIJwwzpGrxy1vwSpqJugpLvig5CwD5i1YudRIY6s88PZdAHdkSbRcmg4PmcpR1OPbUPh84SAimlkIh1PfpW70Jvl1WLFc8MXKOgd1lCfnD9wTrVxqS0girb+KFpOyn1KwRajIYv11oSTO8xVGBJxjOidIzNn5ESfGRSDr0SvSNFn9HSaTNPl7ED8UhAsSx/Aekg6YLizKP4msxuxN0wgmLPdIuM7pzZTcRg3I2EG0+oFEyuWQeJQTNItaL6KV/FP8aOMRYtHo1WC2PksHnz6jdaC5775AMMOI6x9ATN9zBM3RVkYFeH1QJruqvsgM7tFg==
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
  • Delivery-date: Tue, 02 Mar 2021 16:54:52 +0000
  • Ironport-sdr: V2e5z+RlzawdZSXba4phXi66VNDhKlB+Z2tp8AVhZ/lTqXNg4y2SycQ+2EjkJkxwl8Ei9l5n72 TRsXwUNpiPVMgRrraiT4nuN2ob9s+zRmzgxicO2mZ4xW8RHVxlbSDXuNDmJmAFNEmLtwdE8fCT CU+oELDCQBQac7szb/fK9exp79HxOass/cwvtcN6nqVr9c7f9P6/gKnyz7jYMwakoSs9e04r+C xSIC9i9PeNSEoMBqnxrPBRfUU8st0wQSEImngmPenOJpbYIOPKb6gNZ90kwLDrikPzs3O376jf /JU=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 02/03/2021 15:33, Jürgen Groß wrote:
> On 02.03.21 16:23, Andrew Cooper wrote:
>> Hello,
>>
>> This is a total mess.
>>
>> libxenstored does not have a stable ABI.  xenstore_lib.h contains:
>>
>> * struct xs_permissions, which contains an enum - one of the very common
>> ABI traps.
>>
>> * the prototypes for expanding_buffer_ensure(), sanitise_value() and
>> unsanitise_value(), which are inappropriately-namespaced symbols in
>> libxenstore
>>
>> * struct expanding_buffer with a classic string-handling trap (int len).
>>
>> * Various xenstored-internal details such as struct xs_tdb_record_hdr,
>> the internal permission bits, as well as stuff like
>> xs_daemon_{root,run}dir(), and worse xs_daemon_tdb(),  which have
>> absolutely no business being external to xenstored.
>>
>>
>> Its clear that most of this shouldn't be part of libxenstore, but that
>> ship has sailed.  3.0.3 is broken and cannot be fixed.
>>
>> My best suggestion is that we freeze 3.0.3 where it is, and create a 4.0
>> which has all of the xenstore_lib.h content deleted.  That, AFAICT, gets
>> us something which is 99% compatible, and stands a chance of being able
>> to kept properly stable.
>>
>> Thoughts?
>
> How would that work in practice?
>
> Would we ship both libraries, or only 4.0?

I *think* we can create 4.0 with just a tweak to the map file.  Then, we
could build 3.0.3 side by side with 4.0.

We already have the compat for xenstore/xs{,lib}.h which adds to this
mess.  I was thinking of adding a build time "want xenstore compat"
option which gets you 3.0.3 and the badly-named headers.

~Andrew



 


Rackspace

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