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

Re: Backport request (was: [PATCH v2] tools: convert bitfields to unsigned type)


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Tue, 4 Jul 2023 18:10:32 +0200
  • 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=yIKXBwrWOoEo2vpzPk3libQACzHijNXPMKP0KCbHiu4=; b=oFh57AbBnfyO7cQcXa6Y93VPWYICJmljK1oAekM4C0fSp4sCyL++Mz9Oq6/clcdZFnboK6/GVTIqlh1exW/idLOBmfVFztfRT2T7Y2gstl27VOZpV0cXnu3RubxJIyOGSO7hWtRh6LvDY+5OhqrBndI9kRc6mKgPfzSB3TiVMZvSILyiMCtOi3qCJlWhIa2+ee1fZwBI7ejh2nmydjkE+vbkxZYAGKoMns8hEoVTS+Py+n3dhNi1iIrJ5JcMPq7LkeAkZuguxMXZt3+55j3QbzNtli4nVR9Jp8hdj2dBPIKQ9XDurjGCOaSAAzTca/9JDxz+7z51Pj0Uqs8+c6sEIA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oUsftBTPZMzxfsfjxodgIKwfju0PGHh9hLpRhUNb3nL53OeuxtoLb9A034EoyVgjAqeBJdwyQa/UHV6wOwOEXe79KASsO46lPp1CLsWQV/Td3pw0TXm1PzIbdu8yGOfIfQuTLrtYNvIh/pfFPvl0TX1daxb3f4sa/LqZjNtp2SPYwIwux+hb+ixKqOsEL/dmBEJliXKlJT0dEwXpgUEmruMxhdz5bmUeRZgR2DuKX00Jo5kKverx3DGuDko5seEiP69Qty1EUx9VVVieDPj6xzhi1evRwVqb4BXorqS7nudGcTVYoeMjKKuUAXgg5rn9oi49xUjmnxEwa+QOymBrUA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Wei Liu <wl@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Delivery-date: Tue, 04 Jul 2023 16:10:58 +0000
  • Ironport-data: A9a23:pNoBYqDs0HRPjxVW/xjiw5YqxClBgxIJ4kV8jS/XYbTApGkggmMDn 2EYCzyAOP2OYmL3fdlzaIi+oR8BsJGHyoBmQQY4rX1jcSlH+JHPbTi7wuUcHAvJd5GeExg3h yk6QoOdRCzhZiaE/n9BCpC48T8nk/nOHuGmYAL9EngZbRd+Tys8gg5Ulec8g4p56fC0GArIs t7pyyHlEAbNNwVcbCRMsspvlDs15K6p4GxA4gRlDRx2lAS2e0c9Xcp3yZ6ZdxMUcqEMdsamS uDKyq2O/2+x13/B3fv8z94X2mVTKlLjFVDmZkh+AsBOsTAbzsAG6Y4pNeJ0VKtio27hc+ada jl6ncfYpQ8BZsUgkQmGOvVSO3kW0aZuoNcrLZUj2CA6IoKvn3bEmp1T4E8K0YIw9+N6O3pJ5 6whBCkdNjPaoPmt0a63Rbw57igjBJGD0II3nFhFlGicIdN4BJfJTuPN+MNS2yo2ioZWB/HCa sEFaD1pKhPdfxlIPVRRA5U79AuqriCnL3sE9xTI+uxuvDC7IA9ZidABNPLPfdOHX4NNl1uwr WPa5WXpRBodMbRzzBLcqy/037SWxnuTtIQ6OrH78qVrrEeohTIeBRMwTH6mj6OWhRvrMz5YA wlOksY0loAw/kG2Stj2XzWjvWWJ+BUbXrJ4A+A8rQ2A1KfQywKYHXQfCC5MbsQ8s807TiBs0 UWG9/v2ARR/vbvTTmiSnp+Woim1IjM9NnIZaGkPSg5t3jX4iIQ6jxaKQtM9Fqew14TxAWupn GjMqzUijbIOi8JNz7+84V3MnzOroN7OUxIx4QLUGGmi62uVebKYWmBh0nCDhd4oEWpTZgDpU KQs8yRG0N0zMA==
  • Ironport-hdrordr: A9a23:VxIYO6hlWhmATj9QKGjvr3tDy3BQXt4ji2hC6mlwRA09TyX+ra yTdZUguiMc7Qx7ZJhOo7690cW7IE80l6QFgrX5TI3DYOCOggLBRuxfBODZsl/d8kPFh4pg/J YlX69iCMDhSXhW5PyKhzVQyuxQpeW6zA==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Tue, Jul 04, 2023 at 06:04:36PM +0200, Jan Beulich wrote:
> On 04.07.2023 17:55, Roger Pau Monné wrote:
> > On Tue, Jul 04, 2023 at 05:42:33PM +0200, Jan Beulich wrote:
> >> On 28.06.2023 11:46, Roger Pau Monné wrote:
> >>> On Mon, May 08, 2023 at 04:46:18PM +0000, Olaf Hering wrote:
> >>>> clang complains about the signed type:
> >>>>
> >>>> implicit truncation from 'int' to a one-bit wide bit-field changes value 
> >>>> from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
> >>>>
> >>>> The potential ABI change in libxenvchan is covered by the Xen version 
> >>>> based SONAME.
> >>>>
> >>>> Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
> >>>
> >>> Can we have this one backported to 4.17 at least?
> >>
> >> Hmm, while perhaps simple enough, in principle this wouldn't be a 
> >> backporting
> >> candidate. May I ask why you consider this relevant?
> > 
> > I have to take this fix in order to build 4.17 with current FreeBSD
> > clang.  I think in the past we have backported changes in order to
> > build with newer gcc versions.
> 
> We did, and this is good enough a justification.
> 
> >> Plus is the mentioned
> >> "potential ABI change" safe to take on a stable branch? There's not going 
> >> to
> >> be any SONAME change ...
> > 
> > Is there any ABI change in practice? Both fields will still have a 1bit
> > size.
> 
> But what a consumer of the interface reads out of such a field would change
> in case their compiler settings arrange for signed bitfields when signedness
> isn't explicit. We don't dictate, after all, what compiler settings to use
> with our interfaces (which generally is good, but which bites us here).

Hm, I see.  I would argue that sign doesn't matter here, as those are
intended to be booleans, so anything different than 0 would map to
`true`.  But implementation might have hard coded TRUE to -1, and the
change would then break them?

I'm failing to see that, because those implementations would still use
the old struct declarations they have been built with, and hence would
still threat it as signed?

Thanks, Roger.



 


Rackspace

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